Simplifying sorting a bit