Erlang port of the anvil client