Brian's edits, especially to the randomize module type