refactor/code review - more helpers - less direct session access