Move version-specific hooks

For migration to v2. No real code change.