Semi-automatically remove trailing whitespace.
Looks like the old code missed a 'self.'.
Simplified a bit.