Implemented client-side sorting and threading