Added fade-in and fade-out transitions.
Tried to fix merge.
Fixed transition issue caused by merge.