Modificcations to html.py

I want to patch it a bit, and eventually redo the back-end, if you will,
using ElementTree.  I'll fix up the licences and notice when the dust
settles.
Refactoring FTW