Updated with more on the command protocol and more codes.