Argh! I knew I was going to make a numerical mistake somewhere, thanks for spotting it. Correction will be up shortly. Thanks for spotting it! :D
And thanks for the text example! This looks like what I was trying, but clearly I had a mistake somewhere.