Added support for localStorage as a configuration option.