Adding inheritance for base classes, dependency injection for session.