added more flexible processing of stored functions so that we can begin defining domain specific libraries, such as the provider registry