Further cleanup and tweaks