Rough first implementation of -target-formulas

For searching for other kinds of targets besides concrete strings.
In this version written parallel to the concrete string code, though
on reflection maybe it would be better to just unify them.
Also remove some out of date comments in the same area.