Fix pb in checking for self before partyadd
Bring in Sleipnir's delta function.

Fix typos.
Left to do: bring out into a single function and reuse.