Remove usage of deprecated APIs

This doesn't use any APIs that aren't available in 0.152.0, and should be ready to release.