rewrite SortedCollection to use topological sorting
Merge pull request #1 from topicusonderwijs/master

Test out SortedCollection changes