Move marshalling code to a new .c file
Add lots of protocol functions to protocol.c
Merge branch 'master' into proto-funcs

* master:
  Cleaned up protocol.c

Conflicts:
	protocol.c
Fixed lots of small bugs
Merge pull request #14 from amlweems/proto-funcs

Proto funcs