final cleanup in refactoring