Fixed destroying sessions.
Tidied up logging.
Session recording is now a session parameter.