Created base, factory and subclasses