Added localStorage support