Settings: Fix up and optimize

Change-Id: I87e376dce590ee52661faedf6d510f68b51852ad