refactor how configuration files are handled