Runtime refactoring