Migrate BidiRunList and BidiRun to automatic memory management