First working update

See readme for details.  Lots of changes.