Remove imports and make event cancelable