Refactor code.
Add IndexMapper and IndexReducer.
Finish IndexMapper and IndexReducer.