Cleaned up the CUDA version to be consistent with the other versions. It still does not use CUDA, however.