fixed jshint warnings
Changed the side panel handling