Refactor 2PC a bit