 // 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)
+                curandState* state, int current_iter)
 {
 	int i = blockDim.x * blockIdx.x + threadIdx.x;
 	if (i < n)

    int naccept_theta = 0;
    std::cout << "Running MCMC Sampler...." << std::endl;

    thrust::host_vector<double> h_mha_ratios(n);
    thrust::device_vector<double> d_mha_ratios(n);
    thrust::host_vector<double> h_logdens;

    for (int i=0; i<mcmc_iter; i++) {

        int cholfact_index = 0;
        for (int j=0; j<dim_theta; j++) {
            for (int k=0; k<(j+1); k++) {
                scaled_proposal[j] += h_theta_cholfact[cholfact_index] * snorm_deviate[k];
                cholfact_index++;
            }
            scaled_proposal[j] = 0.0;
