Use cls instead of self for class methods

Python convention is to use "cls" for class methods
and to use "self" for instance methods.