clean up code in settings-api