Clean up structure of initialize_session helper function
Improve wording of comment