Move fuzzing into a class to remove global variables

I also added more debugging code because I was trying to see if I
broke things during the change.