Here's the first commit.  The code is unmodified from when I last worked on this (a year and a half ago).  It is very much an unfinished product, but it DOES work.