Fix bug returning progress data. Also extract info from gcode in sendCode().