Refactored Renderer to use unique_ptr