Can you extract object creation into a separate factory?