Code cleaned and commented. Exercise 5 complete as in last commit.