Move unshared code out of Util.