Feature/optimize interpolation

A lot of little mathematical speed optimizations, and one big accuracy optimization (using LUP matrix decomposition to solve for b instead of matrix inversion).