Arrange code of task dialogs.