Overhaul config.c

- rename callbacks
- sort callbacks
- uses macro instead of spagetties