Reorganise libs, upgrade d3.