Improved the html parsing w/ tests