Put in a few more bug fixes into the test branch.