Added log determinant function and simplistic test case