Final code cleanup of regression testing with updated QD library.