Updated source, modifications to the ordered array.

Array.prototype.sort does not return a new array, it modifies the existing one.