Tidied up name variant algorithm. Time to thread it, it's slow :(