#782: Refactored into base classes.