Work in progress - just checking it in as a backup.  These changes have not been tested.