Proper function types; improve _expr_print and _name_type