Fix deprecation warnings
Merge pull request #56 from ebfe/deprecation

Fix deprecation warnings