createVariable() updated (correctly associates variables and their declaration-invocations)