Improve code for removing and reloading fields in the config panel.