couple of docfixes

A couple of typos in the docs are fixed ( self.  vs self:  )

Also, by accident, my editor cleared trailing whitespaces from both files. I don't think it's an issue (I also see it as a cleanup), but if you do, I'll reissue the PR.