Added constructor and references to localStorage.
typo