added code for transferring session states
fixed bugs in delete script, finalized session state transfer