This file is being rewritten. Found bugs after writing tests. D3 provides the constants i think -- will use them.