Added mechanism for sorting according to column names. 
Still to add sort according to Mark box.