The first organization of the earth system took place within 800 million years of its formation. During this first organization (which is known by the name of differentiation), the earth melted, and iron being heavier, sank towards the centre of earth, along with other heavier elements like nickel, to form the core. The comparatively lighter materials formed the outer layer on core called mantle which consisted of partially molten rocks. The lightest materials present in the original earth were expelled as gases during differentiation to form the first atmosphere. The newly formed atmosphere at this stage consisted mainly of gases like nitrogen, carbon dioxide, hydrogen and water vapour. There was no oxygen gas present in the initial atmosphere of earth, but the oxygen gas was added to the atmosphere much later when the process of photosynthesis took place.