Refactor: getTraitClasses(), getAllTraitClasses(), getTraitGroupsHierarchy(), getAllTraitGroupsHierarchy(), addOrUpdate methods, addTraitClass
Added TraitClass, update methods