Simplified "_getRequestObject" function contract by moving handlers inside the function