Add difficulty and improve the random generation.