Fixing localstorage problems, and fixing index on create