Documentation. Improved behaviour for first view of rendered diagram.
Add more tests.