Instance factory.