update gitignore
refactor session handling and update tests