Mapper and Reducer implementation
Modification in Main class to restart iteration after one MapReduce iteration finishes.
Helper methods for mapper and reducer.