Added more sorting stuff & fixed some of the old stuff