More refactoring with new base classes.