Lint fixes and some code cleanup