Refactored directive