Added support for sorting tables.