further cleanup and other tweaks