Refactoring and fixing a bug in close session message

Change-Id: I854c513a9084cae589813bb1ae360d3e67eecf96
Signed-off-by: TanelDettenborn <tanel.dettenborn@intel.com>
Merge "Refactoring and fixing a bug in close session message"