Using functional update
Replaced None->0 when it is a good idea
Changed to approach to generate subtasks inside tasks