Added some abstraction to get MegaFactory to work as a generic initialiser