Swapped loose collection of functions out with a tighter pair of Classes.

In doing so, the user-defined configuration was moved from a loose
collection of global vars to a single 'options' object.  For executable
purposes, a separate JSON config file and a parser, or a command line
switch, might be preferred.

Signed-off-by: David Arbuckle <dintlu@gmail.com>