Added parameters to method to_file().
Reorganized methods to match smclient.py
Now using .format() for GUI strings.
First commit with the state machine emulator. Inputs are not implemented yet.