Updated Renderer to use shared_ptr