Fixed a few shell bugs
Fixed reverse, moved automata to Automata.py