Fix few typos in QlSession, improve error handling

Fix a few ridiculous errors that were preventing QlSession from working.

Improve error handling and logging in a few places.
Change QlSession data members to private

Somehow they happened to be public. Fix that.