Removed unused code in InMemoryFactory