generalized setting local storage stuff (probably need to rename this thing...)