Fixed merge conflict and added in some transitions.