refactor templating system for un/registering processes