Tortoise: minor code improvements