Sort table entries sensibly.