Move more code into abstract factory