Merge "Better separation of concern for the render thread" into main