The Formation of the Cosmos