Support erlang:register/2 and erlang:whereis/1

Any comments to the way I implemented this?