Made it more stand-alone friendly (session)