Indentation and brace matching fixes
Add missing declaration of self