Updated how UserSettings are saved, the function is more flexibile now