Make the faction changer logic much more concise.

Closes #207