move openFactoryFunction into IRTypeManager