Update #9: Determinants made much more efficient. 

Matrix inverse is broken.