Misc changes and cleanup