refactoring framework (phase 1.2)