Fixed sort methods and binary search method

Can now sort most of the data. Getting an index out of bounds at a
certain point.