Added conditional declarations to session_init and kill so that they wont be redeclared