Elixir rewrite of heap structure for Erlang VM