Ob type refactoring almost in place.
Refactoring of obtypes passes tests, with some errors.
Several memory leak fixes.
Clean up