Refactored the request processor