Fixed deprecated code (as of release 0.12.5).
Merge pull request #7 from pap/fix_deprecations

Fixed deprecated code (as of release 0.12.5).