Added initial (not finished) code for macr substitution.