Fix up inheritence in classes