More refactoring of design