tweaks and code cleanup after refactor