use get for lookups in the callback registry Map, refactor some common code