Tests cleanups and fixes.
Fixing a bug in examples.
Adding another test for models.
Adding code generation for docs.
Adding tabs.
Fixing some bugs.