Merge script-local Register/Install/Init functions to clarify logic