linting cleanup

whitespaces, missing semicolons, and duplicated variable declaration