cosmetic code cleanup

This also fixes non-newstyle classes to be new-style.