Fix deprecation warnings.
Merge pull request #4 from nightscape/fix_deprecations

Fix deprecation warnings.