Tidying and linting JS