Ok, the cramp under the rib is only psychological, believe me
http://en.wikipedia.org/wiki/Side_stitch
The only solution to that is to train more, when it happens slow down a bit, you can even walk if necessary but then continue to run when it the pain slows down.
As for the sides you need to stretch, do around 6 to 7 exercises after each run, take your time, 5 to 10 minutes, it's just as important as the run itself. If you don't know stretching exercises I'll try to find you some of the most common ones.