Using a singleton factory to create classes extending an abstract implementing an interface