Adapted to planning on efbytesref branch.