cleanup and tweaks