Refactored and refined the PyOpenCL-implementation.