fixed some typos added a few notes marked with XXX

The typos I fixed are reasonably obvious. 

I inlined a few comments and marked them with XXX. It would be preferable if you'd look into those quickly after merging this, to prevent "the public" from seeing them...