Cleaning up comments and wrapping calls with CUDA_SAFE_CALL