Exercise 18.

Also, moved exercises into modules and introduced quickcheck for exercise 1.