Began with class documentation
Fix state transition