Almost finished

-All that is left is to close the input/output files and finish the
documentation.