Changed swapshuffle to use mt_rand() rather than rand(). mt_rand gives better randomisation.