I've used the State Machine Template quite extensively, and even modified it to fit the apps I like to write.
I've added the following features to the template. They are really unrelated to the State Machine processing, but more UI related.
1. Create/Open an .ini file in the same directory as the Top Level vi or executable. Could be the same as the .ini created by an executable, but not necessarily.
2. On exit, store the window position of the top level vi in the .ini file. On startup, restore the window to that position. This also includes monitor number for multi-monitor systems.
3. Use MGI Save Front Panel Data.vi and MGI Resore Front Panel Data.vi to remember control values between runs. These values are also stored in the .ini file.
Basic stuff, but nice additions to most applications.