Clean up the element on "$destroy"

To prevent memory leaking