Refactored to use config files.