Revamp config.c