Manage task map as part of Task.

More #613.