Refactor html parser class.