Add type information into scripts/protocol