Update to use localStorage and JSON