So i am still trying to understand the general proof of the CW approximation. At one point in the proof we have the inductively build CW complex $Z^{n+1}$ together with a map $f:Z^{n+1} \to X$ such that $$f_*\colon\pi_k(Z^{n+1})\to \pi_k(X)$$ induces an injection for $k\le n-1$ and a surjection for $k\le n$.
Now in order to prove surjectivity of $f_*$ on $\pi_{n+1}$ we choose maps $h_\beta\colon S^{n+1}\to X$, $\beta \in J$, that induce a generating set of $\pi_{n+1}(X)\setminus \operatorname{im}f_*$.
We define $$Z:=Z^{n+1}\vee \bigvee_{\beta \in J} S^{n+1}$$
Now my question is rather elementary: Why do maps $h_\beta\colon S^{n+1} \to X$ qualify as attaching maps for $Z^{n+1}$ when we clearly have the images $\operatorname{im}h_\beta \subseteq X$.
Related to that question: The only way i can make this work, is if i consider $Z^{n+1}$ as a subspace of $X$, i.e. $Z^{n+1}\subset X$ with the inherited subspace topology, which implies the functions $f$ we are constructing in the proof of the CW approximation are all regarded as inclusion maps.
Am i correct? Can someone help me with my confusion?
Thank you very much!