Code optimalisations. (Now runs at 2048 random moves with solid performance.