refactored cleanup()
changed order in runCLKernels()