Pulled out transitionEnd into external file