Climate change summit ends in Copenhagen: narrowly avoids failure.