Autocleanup and some tweaks