Fix two testfailures generated by fix for GH-80 and cleanup code.