Removing the session dependency