HTMLparser refactored