Clean up the code and improve the LED handling
Some additional code cleanup
Additional check on the packet size when processing "Transmit Block" command