Made some slight modifications on the random class to ensure type-safety.
Made some slight modifications on the random class to ensure type-safety.