Reorganizes state machine file packages.
Partially implements #33. Closes #29.