added documentation
added session message methods
fixed syntax error
changed the messages behaviour