Fully commented code.  Writes a table output file as well as a token output file.