BEAM emulator written in Erlang