Added ability to define custom class for base models to extend