Improved html parser