Fix test failures

Merged in the changes from @viveksjain and fixed any test failures that came up.
I don't think this is legal HTML. ul can only contain li as far as I'm aware.