cleanup in directive instead of scope