refactored config. added CLIMain