Better documentation and diagram correction