commenting line that cleared localStorage on every page load which caused many issues.  also corrected some syntax errors