Revert change to merge_states
Add explanatory comments and simplify mod_zero
Fix (I think) issues with merge_state and rename dupl functions
Add dfa equivalence checking function and renamed ast_to_dfa
Delete ast_to_dfa