Bug-Fixes/New-Code in Session Library and its corresponding tests