Fix 7: clean up parser

This solves enough of #7 for now. Perhaps a complete rethinking of the html-parsing is required at some point, but this is not the time.

This closes #7.