Adding sorting class to tables