Structured refactoring with legacy code course