use a sorted map in TaskRegistry
removed use of deprecated TaskDefinition
more uses of the public task map