Fix #292 - Overhaul config.c