Adds code to serialize commands and apply crcs