Use wrapper function for html parsing class
remove some newlines
Use generator comprehension instead of for loop