Designing a data editor and mapper

I've been trying to figure out the best way to design a data mapping and editing tool.

The problem is as follows:
I have data from multiple sources that don't follow the same naming convention. For example, data from source 1 has "sex > females" to denote females while data from source 2 has "Gender > Girls/women" to denote females.

What I want to do is to create an interface that would allow me to
1. Map different data to a single data (eg- Girls/women to females)
2. Add, remove or rename data (eg- adding a new car name to "Car > Nissan > "NEW_CAR_NAME")
3. Bucket different data into one new category (eg- putting "females" and "males" under a new category named "people")
4. Order the data. (eg- put female above male or the other way round, etc)

The following is what I've come up with:

enter image description here

^All the data listed in hierarchical order with the option to expand/minimise and order the data.

enter image description here

^clicking on the data name brings up a modal that provides you options to rename, add a sub-category or put the data in a bucket.

I'm just not sure what would be the best way to implement this and I'm not particularly happy with the current solution as there could be several nested sub categories and complex mappings.

Any help would be appreciated. Thanks in advance!!