A little refactoring so that the condition functions receive a fact object containing the request and the context. This should help prepare for using rule engine