simplify API

first round.

s/defineTask/task
s/taskFunction/run