config file, refactor