Sort lists in place when possible
Remove code duplication
Don't construct empty lists in tests
Use operator.itemgetter instead of lambda when possible
Merge branch 'desbma-develop' into develop