test for typename hinting
rearrange code for correctness
one more test
simplify table building