Complete rewriting of Party logic.