Session reuse

Changes that allow for session reuse
Sample scripts included.