Minor modications to enable first unified algorithm.