Custom command line options, documentation corrections and various code style improvements.

These changes introduce a new API method setOptions() (and getOptions()) which allow custom command line options to be set via the class.

There are also corrections to documentation errors, whitespace and style consistency.