Rework session script