Changed this to self in a few places