Refactored type implementation