Better automaton constructor
Removal of empty transtitions and a sample