various optimisations to the Gaussian elimination algorithm that provides SERIOUS speedups ~ 60-100x
fix on optimisations, plus some more improvements