Code clean up

Renaming variables and hopefully making a procedure for shuffleN that
actually works the way I want it to.