more tweaks and cleanups