Fixed a bug in the determinant and added some tests... Seems to work for 3 dims