Deleted double itertools inclusion
Code cleanup
Optimized the genReverse function.