Update to dynamically instantiate services that are defined as functions.