 		}
 	}
     */
-    cudaFree(devStates);
+    cudaFree(devStates);  // Free up the memory on the GPU from the RNG states
     
 	return 0;
-    
 }

        return 2;
    }

    // Allocate memory on GPU for RNG states
    CUDA_CALL(cudaMalloc((void **)&devStates, nThreads.x * nBlocks.x *
                         sizeof(curandState)));
    // Initialize the random number generator states on the GPU
    setup_kernel<<<nBlocks,nThreads>>>(devStates);

    // Wait until everything is done running on the GPU
    CUDA_CALL(cudaDeviceSynchronize());

    /*
	{
		// log marginal likelhoods in parallel on all threads independently


// Decay rate for proposal scaling factor updates. The proposal scaling factors decay as 1 / niter^decay_rate.
// This is gamma in the notation of Vihola (2012)
static __constant__ double c_decay_rate = 0.66667;

// Current iteration of the MCMC sampler, needed to calculate the decay sequence for the RAM algorithm. Is it
// best to put this in constant memory on the GPU and update from the CPU every iteration?
static __constant__ int c_current_iter = 0;

// Pointer to the current value of theta. This is stored in constant memory so that all the threads on the GPU
// can access the same theta quickly.
static __constant__ double c_theta[2];

// Initialize the random number generator state
__global__ void setup_kernel(curandState *state)
