Javascript localStorage handler for storing settings