This function and the functions it depends on are not strictly necessary.  I put them in here to aid in debugging, but they might cause output noise the ateam doesn't want.