More Linting

Lots of small tinynesses, and a couple of actual bug fixes