Also add corresponding test cases, making some mostly cosmetic changes to the test program while on it.
testfuncs.py uses custom testing functions. testparser.py uses the unittest standard module.