added config parsing and improved html parser