transformation/rotation: Migrate code