Allow setting of task and default task

Previously all the persistence was done in the default task, but now
we can either set a default task or set the task in the arguments list
to persist.