Finished work to better handle multiple input files.