Refactoring AHFA state logic: valgrind, t+ mod AHFA #'s, perl.t