Merge repo to html refactor

Made the changes necessary to merge Ian & John's code. Kept what looked the best out of either, and also re-wrote the unit tests to fit with the javascript object format.
Closes #45