initial refactor of session.py into package
fix warning from pycharm static analysis
pull templates from correct place