Improved service dependency code