Nice model of Solar system: Does gravity produce larger distance between objects? Counter intuitive it seems that in some cases gravity results in a higher orbit and greater distance. For example the moon is attracted to the Earth but because it gets a higher speed it ends up farther away from the Earth. 
Also our solar system could have been in early days much smaller (according to Nice-model), but caused by gravity of Jupiter and Saturn the outer planets were pushed farther from the sun although there must be an attraction involved between the planets what would suggest the get smaller instead of larger. 

The Nice Model is a scenario for the dynamical evolution of the Solar System. [...] It proposes the migration of the giant planets from an initial compact configuration into their present positions, long after the dissipation of the initial protoplanetary gas disk. [...] This planetary migration is used in dynamical simulations of the Solar System to explain historical events including the Late Heavy Bombardment of the inner Solar System, the formation of the Oort cloud, [etc]. [...]

Now are for example also comets gets higher orbits as they are attracted to the Sun?
So in general, is gravity always causing larger distances between objects?
 A: Gravity tends to pull things together: it's an attractive force.  The issue is that (in general) energy and momentum also need to be conserved.  That's one way of understanding orbits: even though gravity pulls things together, if you start with two point-masses and a relative velocity, they will orbit instead of colliding because the angular momentum needs to be conserved.
The same is true in these more complicated examples.  The reason why the moon is actually (very slowly) moving away from the earth is because rotational energy is being transferred from the earth's rotation to the moon's orbit (this happens via tidal forces).  This problem is complicated because dissipational forces are important (ones which don't conserve kinetic/potential energy).
In the Nice model (which, keep in mind, may or may not be very useful for explaining planetary dynamics) the gas-giant planets move outwards by exchanging energy and angular momentum with smaller bodies (asteroids, planetesimals, gas, etc) which are then moved inwards.  In the Nice model things are definitely not all moving outwards, there's just an exchange between outer and inner objects, and it so happens that the asteroids/planetesimals/gas are then accreted into our current planets, onto the sun, or dissipated away.
