Changed factory template to options