multi-value sorting, some other tweaks, test updates