Move callback functions to top of config, for simpler construction.