improvements to variable matching
link contract instantiation