Finished final program, inc. file i/o