Refactored web services code.