Changed carrying test as threadlocal instead of local variable.
Refactored context evaluation. Added support for request/session attributes.