Foundation for refactoring