The Category of Affine Varieties