Various little fixes.

Removed debug messages and switched to using Random#rand, which with a
parameter returns an integer.