Patterns for Prototype and Factory