cleanup
add d3 package
refactor
remove unused code and simplify