Fix 0.4 deprecations. Fixes #57.
Merge pull request #58 from timholy/teh/deprecations

Fix 0.4 deprecations. Fixes #57.