more refactoring tonight