Cleanup, fixes and tweaks