Rewriting html_render.py from the ground up, trying to do so with minimal use of notes