Code refactoring.
Added transition effect.