Here is v2 of my patch. Thank you for the comments. -- Sean Whitton