Remove references to Math.random()