Massive

Overhaul to make session variables available to frame