Some cleanup of do_task_eval and planning