Tidy up and JSLint