Web service - minor refactoring