Implemented exercise 5a and b)
Added answers to exercise 6abc)
Corrected mistake in previous commit.
Added exercise 7 implementation.