Added states to automaton and log window to GUI, plus small cleanups.