Improved our_algdep and discover_equation functions.