Refactored out abstract classes.