removing some old stuff and fixing bug with localstorage