nfa remove state functionality and tests