Refactor some components into Mustache. With the footer refactor addressed in #75, it should solve most of the incompatibility issues caused by previous hacks used to generate the footer