Added solutions for exercises 4-7.