Since our documentation is fairly complex, we need to have a document which describes how various parts of it work. This PR adds such documentation.