generic_type: major rewrite
Minor changes...