Fix memory leak by removing clone when scope is destroyed.

This PR fixes a memory leak that occurred because the cloned element(s) weren't removed and cleaned up when the directive scope was destroyed. It also adds a missing semi-colon and removes some trailing whitespace.