Cleanup

Some small changes. Feel free to merge as is or cherry-pick some commits.