Formation of the Solar System