reducer.py

Changed the reducer logic in such a way that the check for mirroring is removed from reducer. Reducer will not be faster compared to previous logic. Also, the "dict" being maintained is removed, hence reducing the memory consumed.