Jshint fixes and reinit after session loss