Refactored to use interfaces to get around the concept single inheritance limitation.