Add basic implementation of automaton creation and reading.
Add tests for and fix basic automaton usage.