Better shuffle()

Made some optimizations to the shuffle function, no more splicing and
creating new objects, instead just a bunch of random swaps, works just
as good.