more refinements on type specs
Merge branch 'type_specs'