In the middle of turning over affine code to use array of vectors rather than scalar variables