 __host__ void launchKernel(float4* positions, unsigned int width, unsigned int height, float t) {
   dim3 dimBlock(16, 16, 1);
   dim3 dimGrid(width / dimBlock.x, height / dimBlock.y, 1);
-  //fprintf(stdout, "   Entering Kernel.\n");
+  fprintf(stdout, "   launching kernel\n");
   kernel<<<dimGrid, dimBlock>>>(positions, width, height, t);
-  //fprintf(stdout, "   Exited Kernel.\n");
-}
-
-__host__ void drawBoid() {
-  glClearColor(0.4, 0.4, 0.4, 0.4);
-  glClear(GL_COLOR_BUFFER_BIT);
-  glColor3f(1.0, 1.0, 1.0);
-  glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
-
-  glBegin(GL_TRIANGLES);
-    glVertex3f(-0.7, 0.7, 0);
-    glVertex3f(0.7, 0.7, 0);
-    glVertex3f(0, -1, 0);
-  glEnd();
-
-  glFlush();
-  glutSwapBuffers();
+  fprintf(stdout, "   exiting kernel\n");
 }
 
 __host__ void runCUDA(struct cudaGraphicsResource** vbo_resource) {
+  fprintf(stdout, "   running cuda\n");
   // Map VBO to GL with CUDA
   float4* positions;
   checkCudaErrors( cudaGraphicsMapResources(1, vbo_resource, 0) );

// De-allocation of Memory after GLUT stops
__host__ void onGLUTExit() {
   fprintf(stdout, "De-Allocating memory.\n");
   //Deallocate(h_flock);
}

__host__ void createVBO(GLuint *vbo, struct cudaGraphicsResource **vbo_res, unsigned int vbo_res_flags) {
  
  // Create buffer object and register it with CUDA
  glGenBuffers(1, vbo);
  glBindBuffer(GL_ARRAY_BUFFER, *vbo);
  unsigned int size = mesh_width * mesh_height * 4 * sizeof(float);
  glBufferData(GL_ARRAY_BUFFER, size, 0, GL_DYNAMIC_DRAW);
  
  // Unbind Buffer
  glBindBuffer(GL_ARRAY_BUFFER, 0);
  
  // Register VBO
  checkCudaErrors( cudaGraphicsGLRegisterBuffer(vbo_res, *vbo, vbo_res_flags) );
}

__host__ void deleteVBO(GLuint *vbo, struct cudaGraphicsResource *vbo_res) {
  // Unregister with CUDA
  checkCudaErrors( cudaGraphicsUnregisterResource(vbo_res) );

  glBindBuffer(1, *vbo);
  glDeleteBuffers(1, vbo);
}

__host__ int main (int argc, char* argv[]) {

  glViewport(0, 0, window_width, window_height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(60.0, (double)mesh_width / (double)mesh_height, 1.0, 200.0);
}

__host__ void printDeviceProps() {
