Added new command handling functions
Merge remote-tracking branch 'origin/master': collab on protocol.c
fixed build errors