clean up d3 pattern for annotations