fixed some protocol.py indentation, whitespace and commenting issues