Updates gitignore.
Moves localstorage read and write helpers to general.