anchor.diff:  	</ul>
   	</p>"}
   
  +/obj/item/weapon/book/manual/chembook/proc/list_intermediates(var/id, var/list/reactions)
  +	//world << "DEBUG: LIST_INTERMEDIATES CALLED"
  +	for (var/datum/chemical_reaction/C in reactions)
  +		//world << "DEBUG: [C.id] == [id]"
  +		if (C.id == id)
  +			//world << "DEBUG: MATCH FOUND, WRITING RECIPE"
  +			dat += {"<ul>"}
  +			//dat += {"<li>DEBUG: INTERMEDIATE FOR [id]</li>"}
  +			src.list_reagents(id, reactions)
  +			dat += {"</ul>"}
  +			break
  +	return
  +
  +/obj/item/weapon/book/manual/chembook/proc/list_reagents(var/id, var/list/reactions)
  +	//world << "DEBUG: LIST_REAGENTS CALLED"
  +	for (var/datum/chemical_reaction/C in reactions)
  +		if (C.id == id)
  +			//world << "DEBUG: WRITING [C.id]"
  +			var/list/reagents = C.required_reagents
  +			var/list/catalysts = C.required_catalysts
  +			for (var/x in reagents)
  +				dat += {"<li>[reagents[x]] parts [id_to_name(x)]</li>"}
  +				src.list_intermediates(x, reactions)
  +			for (var/x in catalysts)
  +				dat += {"<li>Catalyst: [catalysts[x]] units of [id_to_name(x)]</li>"}
  +				src.list_intermediates(x, reactions)
  +
  +/obj/item/weapon/book/manual/chembook/proc/id_to_name(var/id)
  +	var/datum/reagent/C
  +	for (var/R in typesof(/datum/reagent/))
  +		C = new R(src)
  +		if (C.id == id)
  +			return C.name
  +		else qdel(C)
  +	return "ERROR: NO MATCH"
  +
  +/obj/item/weapon/book/manual/chembook/proc/alphasort(list/datum/chemical_reaction/L)
  +//Creating this because the already made procs in this source were failing to return any data.
  +//Replace it with something more efficient or one of those procs if you can get it working.
  +
  +	var/sorted = 0
  +	var/datum/chemical_reaction/reaction1
  +	var/datum/chemical_reaction/reaction2
  +	while (!sorted)
  +		sorted = 1 //Assume sorted until proven otherwise
  +		for (var/i = 2; i <= L.len; i++)
  +			reaction1 = L[i]
  +			reaction2 = L[i-1]
  +			if (reaction1.name < reaction2.name)
  +				sorted = 0 //LIES!
  +				L.Swap(i,i-1)
  +				continue
  +			else
  +				continue
  +	return L
  +
  +
  +
  +
  +/obj/item/weapon/book/manual/chembook/New()
  +	var/list/reactions = list()
  +
  +	//Populate reactions
  +	for (var/C in typesof(/datum/chemical_reaction/))
  +		var/datum/chemical_reaction/R = new C(src)
  +		if (!(R.category in allowed_categories)) continue
  +		if (!R.id || R.required_container)
  +			qdel(R)
  +			continue
  +
  +		reactions.Add(R)
  +
  +	reactions = src.alphasort(reactions)
  +
  +	//We now have a list of all reactions, on to the formatting!
  +
  +	dat = {"<html>
  +					<head>
  +					<style>
  +					h1 {font-size: 18px; margin: 15px 0px 5px;}
  +					h2 {font-size: 15px; margin: 15px 0px 5px;}
  +					li {margin: 2px 0px 2px 15px;}
  +					ul {margin: 5px; padding: 0px;}
  +					ol {margin: 5px; padding: 0px 15px;}
  +					table, th, td {border: 1px solid black; }
  +					td {background-color: [tablecolor];}
  +					a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}
  +					</style>
  +					</head>
  +					<body>
  +					"}
  +
  +		//Contents
  +
  +	dat += introduction
  +
   	dat += {"<table border = "1" style="width:100%">
   			<tr>
   				<th>Name</th>
  
positive.code: 			</tr>"}
  
  	for (var/datum/chemical_reaction/C in reactions)
  		dat += {"<tr><a href="#[C.name]"</a>
  			<td><center>[C.name]</center></td>"}
  		dat += {"<td>"}
  		src.list_intermediates(C.id, reactions)
  		dat += {"</td>"}
  
negative.code: 		qdel(G) // Bye bye!
  	return
  
  //bar needs love too ~Flavo
  /obj/item/weapon/book/manual/chembook/barman_recipes
  	name = "Barman Recipes"
  	icon_state = "barbook"
  	author = "Sir John Rose"
  	title = "Barman Recipes"
  	allowed_categories = list(DRINK)
  	dat = ""
  	tablecolor = "#6cf988"
  	introduction = {"<h1><span><a name='top'>Drinks for dummies</span></h1>
  				Heres a guide for some basic drinks.
  				<br>
  				<p><h2>Definitions</h2>
  				<ul>
  					<li>Catalyst: A chemical required by the reaction, but not consumed by it. The amount listed is the minimum needed for the drink to mix.</li>
  					<li>Resulting Amount: The amount of drink produced by that mix.</li>
  				</ul>
  				</p>
  				<p><h2>The Recipes</h2>
  				Each recipe is organized into a bulleted list. Sub bullets of a drink listed are the recipe for the parent bullet. Example Below. Some recipes may contain several levels deep of these mixs.
  				<ul>
  					<li>Drink A</li>
  					<ul>
  						<li>Mix to make A</li>
  						<li>Mix to make A</li>
  					</ul>
  					<li>Drink B</li>
  					<li>Drink C</li>
  				</ul>
  				</p>
  				"}
  
  
  //Cleaning up
  