Removed dead code and unused arguments (+ fixed a few typos)

The closing tag is optional. Removing it prevents erronously outputing trailing whitespaces.