Added bits.js on which random.js depends, and also added shuffle method to random.js.   Still need some further debugging though