Updated to allow for inclusion of command line parameters.

Included some refactoring of the classes