Duplicated code removed in all the Settings classes