Eliminate tls_free_type, that can be done smarter without the typecasts everywhere