Move init code to on_session_start()