Move more code to settings_data.c