Working density growth and some stats.

Also local copy of D3 to avoid cross-domain warnings