Further refactoring of the task positioning functionality - extract Task.return_values method