Makes sort ns comparator configurable

- adds length comparator

## Known limitations

## Possible improvements

- want to add 'semantic' comparator eventually which puts requires, used ns-s on the top and the rest below. could also group required/used libs