Cleanup & bug fixes

GPU based implementation is working for limited inputs. Needs more
debugging on perf and larger sample sizes.
Fixed warnings and added reference BLAS library for host implementation.