Revert "Add a function "sortByName""

This reverts commit fc74d347a178c670ef58d6090670c890eaf0ba8a from #419

Revert, since this is a duplicate of d7ae284 from #522