add directives directory; minor refactor of rudimentary d3 implementation