Get code to compile after refactoring