Fixes parse_error text.
Refactors code.
Updates parser to allow to close void elements.
E.g.: <base href='...'></base>.
Adds more parser tests.