Added subclass and base class to factory