TODO: change of types does not seem to break anything, removing the task
helpers: refactored factors()
cluda/cuda: moved local size finder to a separate function