refactor session_ctrl to comply with styleguide