FSMC-NAMD. Improved state machine