Slight refactor, still not sure addtabs() is a great idea
Implements Step 2, tags containing only a string appear on one line
Implements Step 3
Implements step 4, removes original 'simple tag' functionality
Implements step 5
Implements step 6
Implements step 7
Implements step 8, output passes html5 check