Fixed "self" and "def" in methods.