Added memoization to ModList.reduceByKey