Added prepare method and first attempt at 2pc.