a2t.c: More WIP, fix state
a2t.c: More WIP, fix state 2