Added a better randomizer implementation for rand-int