Draft conversion to CBPV types

Not to merge yet.
It would be interesting to see if it is easier to produce types for static caching after converting to CBPV types.