Fixing bug in error tests.
Making calc.detfn() function.
Changing stuff for new calc.detfn() function.
Initial commit for locations() function.
Adding matrixStats dependency.
Further functionality for locations().