Clean up deprecations; make tests pass again