several changes to service scripts utility functions.