Thomas winds up killed, and Kirk arranges to take the acting company onto the Enterprise rather than having them use their normal transportation. It turns out that there are only 9 people who could identify Kodos, and all but 2 are dead, both are on the Enterprise, one is Kirk and the other is some low level officer. Someone tries to kill the low level officer with poison but he pulls through. It's not completely clear that it is attempted murder, it could have been an accident because of the type of poison used (it was lubricant they use in engineering or something, it could have reasonably been accidentally dropped in his drink), but that seems pretty unlikely. And of course the viewers know it was attempted murder
Eventually Kirk actually decides to confront Kodos and they have an interesting back and forth. Kirk has his read a sentence and they can analyze if it is really him. They can't get a complete answer, but it certainly seems like it is him. Later on, the crewman who is recovering overhears that the actor might be Kodos and he heads over to the play to kill Kodos as revenge, but Kirk is able to stop him but they make enough noise that the actors realize what is going on and there is a confrontation. It turns out that Kodos' daughter has been killing the other witnesses, Kodos is completely distraught over this. She did it to protect him, but he didn't want any more bloodshed in his name. Finally, she tries to kill Kirk and Kodos jumps in front of Kirk and takes this hit.
Spock: Almost certainly an attempt will be made on your life, why do you invite death
Kirk: I'm not, I'm interested in Justice.
McCoy: Are you? Are you sure it's not vengeance?
Kirk: No, I'm not sure, I wish I was.
...(skip a few lines)...
McCoy: What if you do decide he's Kodos? What then? Carry his head through the corridors? That won't bring back the dead Jim
Kirk: No, but they may rest easier.
This scene was fantastic, and I thought it brought a few things into focus. Why hasn't Kirk just accused the guy? There certainly seems to be plenty of evidence. Kirk says he's not sure, he needs more to know that this guy is actually Kodos. But why? It seems that Kirk might not turn him over to the courts for normal prosecution, perhaps he is going to take matters into his own hands. If that's the case he will need a crazy amount of evidence, he certainly doesn't want to kill an innocent person. If he's certain it's Kodos perhaps he will take the vengeance route rather than justice. And best of all, when he's confronted with this he admits that it is a possibility and he's not even sure what he will do. That last line seemed to be him justifying to himself that vengeance is a reasonable path.
Another very interesting thing that was brought up in this episode is what Kodos did twenty years ago. It seems that he was the leader of a colony and their food supply was nearly gone. They had 8000 people, but only enough food to feed 4000 of them before their resupply would get there. He decided to kill half of the people so the other half would live. Tragically, the resupply ships arrived ahead of schedule and the deaths were completely unnecessary. It would seem that he is a brutal monster.
But is it that simple? Suppose the supply ships had not been early. In that case, the 4000 people would have survived and the other 4000 who were killed would have died a painless death. If Kodos had not acted all 8000 people would have died a slow painful death. Without the surprising rescue, what he did would be brutal for sure, and yet necessary for the safety of the maximum number of people possible. (note: this is a little hard to say for sure with food, but I've seen this story play out with oxygen elsewhere, it's a bit more clear cut then, but the moral difficulty is the same) Not that what he did was necessarily the best solution, but to do nothing and let everyone die is obviously not the best answer either.
Of course, we also have the way he enacted this plan. There was some reference to the fact that he used some form of Eugenics. Kodos personally decided who lived and died. Certainly there are certain things you need to be careful of in such a plan, you need to make sure you keep enough people alive with all of the skills necessary to run the colony, but having one guy just pick and choose is obviously a problem.