clean up

Cleaned up the OpenCL part a bit. There is still a bug I cannot locate,
but the kernel code should be correct.