Porting code for sortable tables across from 3.1/develop...