Added State-Machine documentation.