DocGenerator minor refactor (support -link command line arg)