Added end solution for exercise 4 and 5, updated end exercise 3 and added exercise 5 in document. Fixed minor bugs