Refactoring Response/Request code