Setup variable resolution code