Mostly sorted the do/in problem.