Added turnaround logic.
Put in own function.
Deleted unnecessary debugging.