Refactored directive skeleton for readability