Added interface for finite automata and added supporting classes