Added saving of tasks to buckets.

Change-Id: Ib742f00fca2d787074e62455101fd309c4816591