Split and refactored program input and output.
More input files.