I added rudimentary stat-collecting to the program. I also fixed some
minor bugs.