Add logic and clean up task.