anchor.diff:  
   compile(B) ->
       Words = to_words(<<B/binary, " ">>, <<>>, []),
  -    Functions = get_functions(Words),
  -    AWords = remove_after_define(Words),
  +    Macros = get_macros(Words),
  +    YWords = remove_macros(Words),
  +    ZWords = apply_macros(Macros, YWords),
  +    Functions = get_functions(ZWords),
  +    AWords = remove_after_define(ZWords),
       BWords = replace_name_function(AWords, Functions),
       to_opcodes(BWords, Functions, []).
  +remove_macros(Words) -> remove_macros(Words, []).
  +remove_macros([], Out) -> Out;
  +remove_macros([<<":m">>|Words], Out) ->
  +    {_, B} = split(<<";">>, Words),
  +    remove_macros(B, Out);
  +remove_macros([W|Words], Out) ->
  +    remove_macros(Words, Out ++ [W]).
  +apply_macros(Macros, Words) -> apply_macros(Macros, Words, []).
  +apply_macros(_, [], Out) -> Out;
  +apply_macros(Macros, [W|Words], Out) -> 
  +    NOut = case dict:find(W, Macros) of
  +	       error -> Out ++ [W];
  +	       {ok, Val} -> Out ++ Val
  +	   end,
  +    apply_macros(Macros, Words, NOut).
  +get_macros(Words) ->
  +    get_macros(Words, dict:new()).
  +get_macros([<<":m">>|[Name|R]], Functions) ->
  +    %Make sure Name isn't on the restricted list.
  +    {Code, T} = split(<<";">>, R),
  +    Code2 = apply_macros(Functions, Code),
  +    %Opcodes = to_opcodes(Code, Functions, []),
  +    NewFunctions = dict:store(Name, Code2, Functions),
  +    get_macros(T, NewFunctions);
  +get_macros([], Functions) -> Functions;
  +get_macros([_|T], Functions) -> get_macros(T, Functions).
   get_functions(Words) ->
       get_functions(Words, dict:new()).
   get_functions([<<":">>|[Name|R]], Functions) ->
  +    %Make sure Name isn't on the restricted list.
       {Code, T} = split(<<";">>, R),
       Opcodes = to_opcodes(Code, Functions, []),
       NewFunctions = dict:store(Name, hash:doit(Opcodes),Functions),
  
positive.code: 	{ok, Val} -> rnf(T, Functions, [Val|Out])
      end.
  b2i(X) -> list_to_integer(binary_to_list(X)).
  to_opcodes([<<":b">>|[B|R]], Functions, Out) ->
      to_opcodes(R, Functions, [base64:decode(B)|Out]);
  to_opcodes([<<":i">>|[I|R]], Functions, Out) ->
      to_opcodes(R, Functions, [{integer, b2i(I)}|Out]);
  to_opcodes([<<":f">>|[T|[B|R]]], Functions, Out) ->
      to_opcodes(R, Functions, [{f, b2i(T), b2i(B)}|Out]);
  to_opcodes([<<"false">>|R], Functions, Out) ->
      to_opcodes(R, Functions, [false|Out]);
  
negative.code:    % Verify that internal pub signed over each func.
     % make sure func1 and func2 are of the correct form.
     % func1(0) != func2(0)
     Func1 = <<" integer 1337 drop integer 55 ">>,
     Func2 = <<" integer 1337 drop integer 54 ">>,
     DFunc1 = << <<" : func1 " >>/binary, Func1/binary, <<" ; ">>/binary >>,
     DFunc2 = << <<" : func2 " >>/binary, Func2/binary, <<" ; ">>/binary >>,
     C1 = hash:doit(compile(Func1)),
     C2 = hash:doit(compile(Func2)),
     Sign1 = base64:encode(sign:sign(C1, Priv)),
     Sign2 = base64:encode(sign:sign(C2, Priv)),
     E = compile(<< DFunc1/binary, DFunc2/binary, <<" binary ">>/binary, Sign1/binary, <<" binary ">>/binary, Sign2/binary, <<" func1 func2 2dup == if crash else then
            2dup commit_reveal integer 1337 
                 commit_reveal integer 1337 
  	  swap tuck 2dup binary ">>/binary, EPub/binary, 
  	  <<" verify_sig_or_die swap drop tuck 2dup binary ">>/binary, EPub/binary, 
            <<" verify_sig_or_die swap drop call
            swap call == if crash else then
  	  integer 12345 ">>/binary >>),
      [12345] = language:run(E, 1000).
  testJ(EPub, Priv) ->
  %This is a weighted multisig that uses the commit-reveal data structure, so that the participants can reveal simultaniously.
  %First I should update testG to have like 5 or 6 pubkeys instead of 3. Using rot is too easy. I should probably use to_r, and from_r
      ok.
  test() ->
      testA(),
      testA0(),
      testB(),
      testC(),
      testD(),
      {Pub, Priv} = sign:new_key(),
      EPub = base64:encode(Pub),
      testF(EPub, Priv),
      testG(EPub, Priv),
      testH(EPub, Priv),
      testI(EPub, Priv),
      testJ(EPub, Priv),
      success.
  
  % we can use testI contract to remove power in the weighted multisig from any validators who double-sign.
  