Updated protocol generator script