Minor cruft and trace-histogram in prep for more generality
Merge upstream