Zhang-Suen thinning algorithm now working jolly well, phew!