Implemented column sorting.