Changed to using localStorage API rather than local storage (fixes issue #1)