3 Logic operated doors you can examine and modify to suit you own particular application. There are duplicate rail changers in the lower logic, these are so you follow it more easily.
Keep in mind I kept these doors UN-optimized so you could follow the logic without me having to make a video...