Add active transition flag to state changes
Resolves #3
Merge branch 'develop'