Added a way for other componants to register global functions in the script with the option to add an access mask.