The transitions are working but refactor is needed