         double ratio = exp(lograt);
         double unif = uniform(rng);
         
+        std::cout << "MHA ratio for theta: " << ratio << std::endl;
+        
         if (unif < ratio) {
             // Accept the proposed theta
             h_theta = proposed_theta;

    //std::ofstream chifile("chis.dat");
    std::ofstream thetafile("thetas.dat");
    
    int mcmc_iter = 10000;
    int naccept_theta = 0;
    std::cout << "Running MCMC Sampler...." << std::endl;
    
    for (int i=0; i<mcmc_iter; i++) {
        // Now grab the pointers to the vectors, needed to run the kernel since it doesn't understand Thrust

// Perform the MHA update on the n characteristics, done in parallel on the GPU.
__global__
void update_chi(double* chi, double* meas, double* meas_unc, int n, double* logdens, double* prop_cholfact,
                curandState* state, int current_iter, double* p_mha_ratio)
{
	int i = blockDim.x * blockIdx.x + threadIdx.x;
	if (i < n)
