A few minor changes as I try to get 2.7 compatibility.