Render refactor.
Added tests for Render.