Refactoring web services