Fixed up the inheritance of classes and objects