# Compactification of space in Hamiltonian formulation of Yang-Mills theory

I am reading David Tong's lecture notes on Gauge Theory where he talks about Hilbert space interpretation of Yang-Mills theories in Section 2.2 of Chapter 2. When discussing the gauge dependence of the Chern-Simons functional $$W[\textbf{A}]$$, he assumes that the gauge transformation $$\Omega(\textbf{x})\rightarrow 1$$ as $$|\textbf{x}|\rightarrow \infty$$. [Previously, in the same section, he says all gauge transformations which are of the form $$\Omega(\textbf{x})\rightarrow \text{constant} \ne 1$$ as $$|\textbf{x}|\rightarrow \infty$$ can be generated by a constant gauge transformation (physical symmetries) of the above.] He goes on to say that, since we then can compactify $$\mathbb{R}^3$$ to $$S^3$$, such $$\Omega(\textbf{x}):S^3 \rightarrow SU(2)$$ are classified according to their homotopy classes in $$\pi_3(SU(2))=\mathbb{Z}$$. If they belong to class $$n=0$$, they are small gauge transformations, and if they belong to class $$n\ne0$$, they are large gauge transformations. [I guess this is similar to the classification of gauge transformations of the $$U(1)$$-bundle on $$S^1$$ according to their homotopy classes in $$\pi_1(U(1))=\mathbb{Z}$$. I mean large gauge transformations as described in this answer, or in Wikipedia.] In fact, the class corresponding to such $$\Omega(\textbf{x})$$ is given by

$$n(\Omega)=\frac{1}{24\pi^2}\int_{S^3}d^3x\ \epsilon^{ijk}\text{tr}(\Omega^{-1}\partial_i \Omega \Omega^{-1}\partial_j \Omega \Omega^{-1}\partial_k \Omega) \in \mathbb{Z}.$$

Now my question(s): why do we restrict ourselves to those gauge transformations which become constant at infinity? What about the gauge transformations which do not become constant at infinity? Since we then can't compactify the space, how do we classify these gauge transformations? What happens to the above integral for such gauge transformations? Is it still an integer?