Misc cleanup and stuff