Refactor registration of descriptors

DON'T MERGE!
Review-PR for now...
And not anywhere near finished yet.