IN PROGRESS: refactor for removal of ~str ~ ... this has unforunately made this string intensive code a complete mess; perhaps there's a lot that would be better as format!() macros now, but for the moment we just want to get this to work doing exactly what it did before.