Refactor: move Task hierarchy to the lop level
WIP: (fixup tests after refactor)