tortoise: minor refactorings.