Begin bug2 writeup
Finish a bunch of cleanup to useafterfree.

Add safety window, ignore "and [loc], 0", and a few other changes.