Refactored MapTask