Reworked the base classes