Remove extra h tags

Thats what I get for guessing how many there actually are and not
looking :). This commit adds an all button that will toggle all of them
on or off. It also adds the start of a refactor to simplify the code.