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

Fix deprecation warnings