removing type variables, big cleanup