Finished the sort methods.