Switch to new-style classes everywhere.

Tests still seem to pass.