Implemented a recursive determinant function.
Still needs testing.