format, rather than in some unknown format. Also clean up the code a bit, remove some code duplication, and add documentation to the Makefile.