Type checker fixes.
Undo type defs.
Test fixes.