New Modbus handling code