Added persistence support (localStorage)