Add further tests and refactor a few pieces
Added testing for html parsing