Removed ununsed global variables in local scopes
Get rid of redundant PHP closing tag
Added missing semicolon in inline jQuery line
Simplified if statement
Merge pull request #194 from coenjacobs/code-cleanup

Code style cleanup