Added type aware create method to factory.