Extract to directive