Added copyright comments
Optimization the order of commands in the protocol