more tweaks and cleanup