Move task creation to a seperate class