Support a few traceroute error cases

As well as a little code clean up.