Given an algebraic variety $X$, I'm asking about the existence of a variety $X^{aff}$ and an "affinization" morphism

$f:X\rightarrow X^{aff}$

such that:

- (a1) $f$ is injective when restricted to closed connected affine subvarieties of $X$,
- (a2) Complete connected subvarieties of $X$ get shrinked by $f$ to points.

Condition (a2) may be strenghtened to

- (a2') $f(x)=f(y)$ iff $x$ and $y$ are not separated by a regular function on $X$.

Then we may require that

- (a3) whenever $f':X\rightarrow X'$ enjoys the above properties, then there is a closed embedding $j:X^{aff} \rightarrow X'$such that $f'=j\circ f$.

**Q1:** Does such an "affinization" morphism exist? Feel free to change the requirements (a1), (a2), (a3) in your aswer (i.e. answer a different question!), if it helps to get a better notion of what ought to be an "affinization" of $X$ (as my requirements may not be the best).

**Q2:** If it exists, is it unique?

I have something like a candidate for $f$, but I'm not sure the following makes sense. Consider the map

$X\rightarrow X^{aff}:=\operatorname{Spec} \mathcal{O}(X)=\operatorname{Spec}(H^{0}(X,\mathcal{O}_X))$

$x \mapsto \mathfrak{m}_x$

where $\mathfrak{m}_x$ is the ideal of functions in $\mathcal{O}(X)$ vanishing at $x$.

**Q1':** Is it even a morphism? Does this work as an "affinization" morphism?

An analogous question would involve a hypothetical "properization morphism"

$g:X\rightarrow X^{prop}$

such that:

- (p1) $g$ is injective when restricted to complete connected subvarieties of $X$
- (p2) closed connected affine subvarieties of $X$ get shrinked to points by $g$
- (p3) an analogous "universal property" holds (if you like).

Condition (p2) maybe might be stregthened as:

- (p2') closed quasi-affine varieties get shrinked to points.

**Q3:** Does such a "properization" morphism exist? Again, feel free to change my requirements in such a way that they meet a good heuristic definition of what a "properization morphism" should be, if it should exist at all.

**Q4:** In case it exists, what about uniqueness?

Then I could ask, in case of existence, if it would be the case that $f$ (resp. $g$) factors through a proper (resp. affine) morphism to $X^{aff}$ (resp. X^{prop}), but I feel that the above questions **Qi** are already sloppy enough!
So, first I'm waiting for some answers or remarks that may point out some obvious things that I may have been missing.