Fixed bug with --iter and --random not using random selection.
Refactor + completed #69, #84.