Fix deprecation warnings
Merge pull request #50 from bjz/fix-warnings

Fix deprecation warnings