Cleanup and rearrange task list.