Quick pass over our .js to cleanup some whitespace issues found. Added missing semicolons and parenthesis to make code more clear. Applied some slight optimizations and possible redirect fixes.
Merge pull request #795 from thezoggy/dev--redirect_fixes_js

javascript cleanup