Improvements

- Changed the way sessionID is accessed
- Changed the way range is counted