Cleaned up protocol.c
Merge branch 'master' into proto-funcs

* master:
  Cleaned up protocol.c

Conflicts:
	protocol.c