rewrote newStandardInOut to first fill a dict with all serial commands to be written, then loop through it to write them. Seems much saner than the previous iteration. Additionally removed a little bit of clutter, replaced standardInOut w/ newStandardInOut