MBH: refactered javascript in to there own files in static/js and corrected a local storage load error