Reorganized and fixed the reading in files and cleaned up the print statements.