Fixes to undeclared vars post switch, removed script enq from base class