chore(config): refactor config to isolate command line parsing