Checkin before refactoring. One test is commented out, as I do not understnd why it fails: the rest pass.