Moved the renderer's initialization to the constructor.