Add documentation and minor code-refactoring

We need to see if we can add a link to the protocol from this comment.