Fully object-oriented

The code is now fully object-oriented. I moved most of the additional
functions in the main function into the dataIO class, anything else that
was left in the main function got moved to the junk code file.