Fixes to blas stuff, beginning of CUDA stuff