Removed base class and renamed type class to entity.