Refactor; Restore global settings on LostFocus