Added 'OpenSession' and 'NewSession' functions.