Refactoring of edge. Now it has a public interface, which for the most part is const (except the automaton index, which still has a set method)