Rewrote Main class to be able to specify from the command line.

Refactored code so that file names used/created throughout classes have meaning and not used the same everywhere.