Refactor read multiple registers

Problems with the previous code:

*  No documentation
*  Input and output parameters mixed together
*  Bits of dead code commented out
*  Useless delay
*  Global counters increment as side effect of formats
*  Status message created in different places and then often discarded