Refactored type hierarchy.