Refactored RDD.sort to utilize sortByKey in the OrderedRDD class