Migrate to M6
Fix tests