Changes closer to faster python impl (next step probably weave or cython