Parse state transitions
Merge pull request #73 from apechimp/master

Added state transitions