Modified Mapper and Reducer.