Added unit tests for DictHtmlGenerator and fixed bugs. Seems to be working now!