refactor config.c, move the find* functions into the modules they belong to.