Use new-style classes

Fixes #19.