Split out registerEventHandlers().
Use r instead of page.r.
Use r instead of page.r.
Return r from registerEventHandlers().
Reuse updateTask() during newTask().
More updateTask() usage.
Using updateTask() uniformly.