Fix Instantiation variables

This is my first stab at adding variables to instantiation json objects.  Here are the current problems:
1) probably not type safe ( I forced it to int)
2) awkward conversion from Var to CExpression (line 109)
3) No compiler warnings or errors
4) Variables are not marked as used