This looks fascinating, I'll throw up a CS soon if that's fine.