Fix broken code

Fix broken code
Remove redundant closing php tag
Remove lots of whitespace