Upgrade code to match new version, clean up adapter tests