Refactoring TListOfXYZ

It is only the last commit that is relevant for this pull request. 
The rest are from the enums. Will be probably good to only merge it after the enums are merged.