Improved tests and fixed an ugly bug in sample TabFoo.

Renaming serialize -> serialize_impl helped a lot...