More refactoring to make work