adapt trait ids to trait names converter.
add documentation for some of the functions.