Adding code to save user global settings