Extract HTML formatter (fixes #3)

Abstraction allows for additional formatters later on (LaTeX? plain
text? JSON?)