safety sync
documentation, continued refactoring of render.py and improved unit tests