Refactoring AHFA state logic: t+ modulo AHFA renumbering

Some test fail due to AHFA renumbering
Refactoring AHFA state logic

Test pass modulo AHFA renumbering.  Has debugging code.