minor cleanup and tweaks