Not that it's germane to you getting it to work according to the rules, but Rule#1 is insane. The whole point of a traffic light is to let the cars in the side road out every now and then, even though the main road is busy; indeed especially when the main road is busy. That rule says to keep EW flowing as long as there are cars on both B & D, which means that the heavier the EW traffic the worse it gets for the guys on NS. They'll sit there for hours in the morning rush....
Get yourself a bonus point by adding a timer in there, along the lines of:
- The N - S light will go green when either A or C is occupied AND N-S has been red for seconds.