Adding a new state to handle the EOC byte and properly parse the command packet.
Removed trailing whitespace.