improve task registry encapsulation