Trashed a good deal of useless code
Fixed  tests (still some fails)