Added factories and base classes.