Stage 1 refactoring completed