simplifying ObjectFactory