Better management of various states of a request and session.