Fixed pick random method
Fixed (again) pick_random_index
Successfully converted hash of rules into objects