Modified protocol generation script