Moved abstract factory to its own class