Implemented reduction algorithm as discussed, randomization works now using Umut's hashing algorithm.