Refactoring. Merged MapRed master and DFS master.