Finished implementing with tests and input file.
Finished writing output to a file.