Merging Gustav's work on the documentation. This is still a work in progress