Added comments and doctype support
Fixed stupid mistake that made it work wrong
Wrote tests for comments and doctype generation