Everything compiles after refactoring