Refactoring at the web service layer