moving config parsing into run(), so we don't have to pass run() a parsed config if we call it via other than main