Sorting dtos and consolidating into one function.
Merge pull request #665 from SmartStubs/master

Sorting metadata object list