Resolve free variable types and input variable names