removes unused controller for external resource directive