Further changes.  Does not run yet...  A lot of todo's.