Rewrote BPRMF, is now about twice as fast.