Implement State/Strategy pattern - Replace Type Code with State/Strategy