remove dead code
add comments
remove dead code for distributions (now handled inside D3)