detach listeners and remove element data