Updated to work with the new Stagehand-core structure