Refactor activity update tasks.