Stage 1 of code clean-up