Cleanup

A few unrelated cleanup commits. Best reviewed commit by commit