simplify interface of service_is_g and its functionality, provide service_get_treename as replacement