Refactor task_manager/tasks as per #12.