Changes to handle different case in variables used in the macro call.
Altered handling of cont/cat variables.