Implement some cosmology functions