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

Fix deprecation warnings