Bugfixing & refactoring of transitions.