Adding Nick Becker's final working version of html_render.py