Cyclic automata, moved everything over to it's own files etc