Stage 2 of refactor