Added in a notion of tasks rather than main, this allows multiple jobs
so it is easy to add background activities.