anchor.diff:  			</tr>"}
   
   	for (var/datum/chemical_reaction/C in reactions)
  -		dat += {"<tr><a href="#[C.name]"</a>
  -			<td><center>[C.name]</center></td>"}
  +		dat += {"<tr><td><center>[C.name]</center></td>"}
   		dat += {"<td>"}
   		src.list_intermediates(C.id, reactions)
   		dat += {"</td>"}
  
positive.code: 	window_size = "970x710"
  	var/list/allowed_categories = list(MED,EFFECT,OTHER)
  	dat = ""
  
  /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: #5C85FF;}
  					a, a:link, a:visited, a:active, a:hover { color: #000000; }img {border-style:none;}
  					</style>
  					</head>
  					<body>
  					"}
  
  		//Contents
  
  	dat += {"<h1><span><a name='top'>The Complete Guide to Reactions</span></h1>
  	<p>This guide will provide the budding chemistry student with access to all the documented and approved reactions for Nanotrasen standard laboratory facilities.</p>
  	<br>
  	<br>
  
negative.code: 	</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>
  