 	// RANDOM NUMBERS
 	// Create the random state seed trackers
 	curandState_t* states;
-	cudaMalloc((void**) &states, total_number_of_neurons*sizeof(curandState_t));
+	cudaMalloc((void**) &states, neurons->total_number_of_neurons*sizeof(curandState_t));
 	// Initialise the random states
-	init<<<threadsPerBlock, vectorblocksPerGrid>>>(42, states, total_number_of_neurons);
+	init<<<threadsPerBlock, vectorblocksPerGrid>>>(42, states, neurons->total_number_of_neurons);
 	CudaCheckError();
 	// Keep space for the random numbers
 	float* gpu_randfloats;
-	CudaSafeCall(cudaMalloc((void**) &gpu_randfloats, total_number_of_neurons*sizeof(float)));
+	CudaSafeCall(cudaMalloc((void**) &gpu_randfloats, neurons->total_number_of_neurons*sizeof(float)));
 	// REQUIRED DATA SPACES
 	float* currentinjection;
-	CudaSafeCall(cudaMalloc((void**)&currentinjection, total_number_of_neurons*sizeof(float)));
+	CudaSafeCall(cudaMalloc((void**)&currentinjection, neurons->total_number_of_neurons*sizeof(float)));
 	// Variables necessary
 	clock_t begin = clock();
 
 	// Poisson number
 	int numPoisson = 0;
-	for (int i = 0; i < total_number_of_neurons; i++){
+	for (int i = 0; i < neurons->total_number_of_neurons; i++){
 		if (neurons->neuron_variables[i].rate != 0.0f){
 			++numPoisson;
 		}


}





//////////////////////////////
/////// CUDA FUNCTIONS ///////
//////////////////////////////


// Random Number Generator intialiser

			}
			// Reset the variables necessary
			// CAN GO INTO CLASSES EVENTUALLY
			CudaSafeCall(cudaMemcpy(neurons->d_neuron_variables, neurons->neuron_variables, sizeof(float)*neurons->total_number_of_neurons, cudaMemcpyHostToDevice));
			CudaSafeCall(cudaMemset(neurons->d_lastspiketime, -1000.0f, neurons->total_number_of_neurons*sizeof(float)));
			CudaSafeCall(cudaMemset(connections->d_spikes, 0, sizeof(int)*total_number_of_connections));
			CudaSafeCall(cudaMemset(connections->d_lastactive, -1000.0f, sizeof(float)*total_number_of_connections));
			CudaSafeCall(cudaMemset(connections->d_spikebuffer, -1, total_number_of_connections*sizeof(int)));
