Finished Exercises 2.27, 2.28 and 2.29.