Remove deprecation warnings. Fixes #33