A test suite for malformed html for the parser

some changes to the parser to make it easier to test
currently everything working