Fix incorrect reaction to nested transitions transitionend event
Add AMD module definition