More refactoring to decouple classes