Fixing JSLint and bad code..