Tidy up code and lint
Lint