Switched all classes over to new-style classes.

Fixes #1918.
Whitespace removal.