Seem to have a working dependency sort algorithm now; sort needs a
transitive operator, but dep< is not, so needed custom algorithm.
Removed deprecated functionality, comments updated