Fixed many bugs.
Improved unions.