Fix deprecation warnings
Merge pull request #51 from ebfe/deprecated

Fix deprecation warnings