Added test option to command line to fake a run through
Refactored code
Added some semi-colons.