Update algorithm and set up clean conversion function (not yet converging).