Changed storage from cookie to localStorage