Cleaning-up OpenCL device code