More refactorings and redesigns