According to Robert Towne, much of his script was written around action scenes that director John Woo told him he wanted to able to direct in the movie. That, and the fact the film was cut almost in half (the original run time was too long), explains some of the gaping plot holes.