Refactored edit subject directive