Redirect to dashboard after updating a task.
Code cleanup.