It works!  Now it needs a user interface, but at least it has started to work!