I wrote this in 2003 and haven't done much with it since then - I'm hoping this motivates me to clean it up a bit;