Remove trailing PHP closing tags

This commit removes all trailing PHP closing tags ("?>") and extra new
lines; it also add some missing semicolons.
Merge pull request #2 from endelwar/remove_ending_PHP_tags

Remove trailing PHP closing tags - Cool thanks :)