Stage 1 refactor