Using thread bound var instead of metadata to keep track of types for variables