Initial import of carli's changes to XCNCIP2.php
First steps to "consortialize" (see pull request #166).