The role of radiative cooling plays an important role in the formation of structures in collapsing gas. In this dissertation I examine the impact of cooling in two formation scenarios: first, the role of H2 cooling in collapsing gas in primordial dark matter halos in the possible formation of supermassive black holes; second, low metallicity cooling in collapsing clouds and its possible role in explaining low-metallicity globular clusters. Further, I introduce a new hydrodynamics code, with a design guided by current software principles. In chapter 2, I examined the proposed mechanism to explain the formation of super-massive black holes through direct collapse. The presence of quasars at redshifts z > 6 indicates the existence of supermassive black holes (SMBHs) as massive as a few times 10^9 mass of the sun, challenging models for SMBH formation. One pathway is through the direct collapse of gas in T_vir ≳ 10^4 K halos; however, this requires the suppression of H2 cooling to prevent fragmentation. In this dissertation, I examine a proposed mechanism for this suppression which relies on cold-mode accretion flows leading to shocks at high densities (n > 10^4 cm^−3 ) and temperatures (T > 10^4 K). In such gas, H2 is efficiently collisionally dissociated. I use high-resolution numerical simulations to test this idea, demonstrating that such halos typically have lower temperature progenitors, in which cooling is efficient. Those halos do show filamentary flows; however, the gas shocks at or near the virial radius (at low densities), thus preventing the proposed collisional mechanism from operating. I do find that, if we artificially suppress H2 formation with a high UV background, so as to allow gas in the halo center to enter the high-temperature, high-density “zone of no return”, it will remain there even if the UV flux is turned off, collapsing to high density at high temperature. Due to computational limitations, we simulated only three halos. However, we demonstrate, using Monte Carlo calculations of 10^6 halo merger histories, that a few rare halos could assemble rapidly enough to avoid efficient H2 cooling in all of their progenitor halos, provided that the UV background exceeds J_21 ∼ few at redshifts as high as z ∼ 20. In chapter 3, I explore the relative role of small-scale fragmentation and global collapse in low-metallicity clouds, pointing out that in such clouds the cooling time may be longer than the dynamical time, allowing the cloud to collapse globally before it can fragment. This, I suggest, may help to explain the formation of the low-metallicity globular cluster population, since such dense stellar systems need a large amount of gas to be collected in a small region (without significant feedback during the collapse). To explore this further, I carried out numerical simulations of low-metallicity Bonner-Ebert stable gas clouds, demonstrating that there exists a critical metallicity (between 0.001 and 0.01 metallicity of the sun ) below which the cloud collapses globally without fragmentation. I also run simulations including a background radiative heating source, showing that this can also produce clouds that do not fragment, and that the critical metallicity – which can exceed the no-radiation case – increases with the heating rate. Lastly in chapter 4, I describe the structure and implementation of the new open-source parallel moving-mesh hydrodynamic code, Python Hydro-Dynamics (phd). The code has been written from the ground up to be easy to use and facilitate future modifications. The code is written in a mixture of Python and Cython and makes extensive use of object-oriented programming. I outline the algorithms used and describe the design philosophy and the reasoning of my choices during the code development. I end by validating the code through a series of test problems.