Cleaned protocol.c