Finished exercise 1.1, 1.2 and part of 1.3.