moved d3 to lib and changed templates accordingly