Automaton engine

Dev branch implements the automaton engine.
Tests passed