Why removing those closing tags?
Closing tags usually only get omitted for PHP class files.