Update for cleaner code. Add more session control. Fix minor bugs.
Session timeout work out fine. Message now implemented in the class. Minor bugs fixed.