Refactoring server requests/responses