Further corrections (mostly to my changes)

This should include the changes you pointed out in the previous pull-request.