cleaned up some of the code
Fixed tests that were not passing by fixing some invalid html