cleanup and working d3 reading bytes