Refactored changes advised by JSLint and removed URL param matching