Minor changes to the ADP algorithm.