updated demo for localStorage, added watch for state saving