Fix up to pass most lints (apart from 80char check)