Some refactoring of the rendering. Immediate rendering now uses Renderer