Enclose code into a task

Because this method is for *defining* a task.

It fixes a bug in commit 56995b95de8fa980aa4e5cea6990cb1810e9e576
Indent