Added localStorage support.