Refactored app.js so that it can handle multiple graphs per page
Modularized d3js logic
Refactored templates to work off js strings, rather than jquery selections of dom elements