code cleanup in the settings