Add improvements from chaper 7 exercises