Socket session and buffer variables moved into constructor. Session checking seems to be broken