MAID-349 Test cases written.
Mapreduce removed and implemented the logic.