Added flexibility to dependency finding
Fixed issues using Lapack