Defining class methods using `self`.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>