cleaned up code
fixed bug in function names
separated cpu and opencl
fixed bug in function names