Refactored type hierarchy