added indentation to HTMLFormatHandler, updated tests and did a couple of minor fixes