WIP: Made a few refactorings to get a slight Numba speedup.
WIP: Removed np.float_ casts to get significant speedup