Added TargetContext clearing before passing to the recursive Translate call.
Changed hardcoded workgroup sizes to 512.
Removed if wrappers for while-loops as they are not needed anymore.