Switched to using binary merging reduce function, rather than niave linear reduce.