Integrated DOCOPT to handle the various options.