anchor.diff:  		  {Encoded, Cache3}  = encode(Elem, Cache2),
   		  {0, [Encoded, encode_nulls(NullCount) | Arr], Cache3}
   	  end,
  -	  {0, [$a], [placholder | Cache]}, Props),
  +	  {0, [$a], Cache}, Props),
       {lists:reverse([$h , encode_nulls(NullCount) | Arr]), Cache1}.
   
   encode_nulls(0) -> [];
  
positive.code: 	0 -> "z";
  	I when is_integer(I) -> [$i | integer_to_list(I)];
  	F when is_float(F) -> [$d | io_lib:format("~g", [F])];
  	_ ->
  	    error
      end.
  
      
  %% Find an object in the list of previously encoded objects
  %% end return {true, {ref, Idx}}, if the search succeeded,
  %% where Idx is the position of the object in the (reversed) list.
  %% Otherwise, return 'false'.
  find_ref(Obj, Cache) -> 
      find_ref(Obj, Cache, length(Cache) - 1).
  find_ref(_Obj, [], _) -> false;
  find_ref(Obj, [Other | _Rest], Idx) when Obj == Other -> {true, {ref, Idx}};
  find_ref(Obj, [_Other | Rest], Idx) -> find_ref(Obj, Rest, Idx - 1).
  
  
  %% Encode an Erlang string to haXe.
  %% Accumulate strings in reverse.
  encode_string(S, Cache) -> encode_string(S, $s, Cache).
  encode_string(S, FirstChar, Cache) ->
      encode_string(S, FirstChar, [], Cache).
  encode_string([], FirstChar, Acc, Cache) ->
      Str = lists:reverse(Acc),
      Result = [FirstChar, integer_to_list(length(Acc)), $: | Str],
      case find_ref(Str, Cache) of
  	{true, Ref} ->
  	    {encode(Ref), Cache};
  	_ ->
  	    {Result, [Str | Cache]}
      end;
  encode_string([C | Cs], FirstChar, Acc, Cache) ->
      case C of
  	$\\ -> encode_string(Cs, FirstChar, [$\\, $\\ | Acc]);
  	$\n -> encode_string(Cs, FirstChar, [$n, $\\ | Acc]);
  	$\r -> encode_string(Cs, FirstChar, [$r, $\\ | Acc]);
          C when C =< 16#FFFF -> encode_string(Cs, FirstChar, [C | Acc], Cache);
          _ -> exit({haxe_encode, {bad_char, C}})
      end.
  
  encode_object(Props, Cache) ->
      {Result, Cache2} = encode_object_rest(Props, [placeholder | Cache]),
      {[$o | Result], Cache2}.
  encode_object_rest(Props, Cache) ->
      {EncodedProps, Cache1} =
  
negative.code:     %%
      %% If it sounds backwards, well, it is! :)
  
      parse_array([], {Chars, put_obj(placeholder, Cache)},
  		Cache, Kv).
  
  parse_array(Elems, C, OrigCache, Kv) ->
      get_token(C,
  