Make things more general and cleanup the config process.