Cleanup

contains a bunch of code cleanup things, but no breaking changes or patches even.