rewrite parts of Makefile and begin custom d3 build system