Add documents
diff --git a/.gitignore b/.gitignore
index 4f1eebd..fb7bf75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 /.*/
 doc/*
 !doc/*.md
+doc/README.md
 ebin/
 .dialyzer.plt
 deps/
diff --git a/README.md b/README.md
index 7f94bc6..988f176 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,99 @@
 local
 =====
 
-ローカルスコープ用の名前サーバ
+A Local Name Registration Facility.
 
-他のアプリケーションに組み込むことも可能
+The library provides the following features:
+- Registration of locally scoped names
+  - `gen_server' (and other OTP behaviours) can use the registration facility through `{via, local, local:name()}` formatted name
+- Can be embedded in another aplication
 
-TODO: document
\ No newline at end of file
+QuickStart
+----------
+```bash
+# clone
+$ git clone git://github.com/sile/jsone.git
+$ cd local
+
+# compile
+$ make compile
+
+# run tests
+$ make eunit
+
+# dialyze
+$ make dialyze
+
+# Erlang shell
+$ make start
+1> local:start(sample_name_server).
+ok
+```
+
+Usage Example
+-------------
+```erlang
+%% Starts name server
+> ok = local:start_name_server(sample_name_server).
+> local:which_name_servers().
+[sample_name_server]
+
+
+%% Registers process name
+> self().
+<0.42.0>
+
+> local:register_name({sample_name_server, hoge}, self()). % succeeded
+yes
+
+> local:register_name({sample_name_server, hoge}, self()). % failed: name collision
+no
+
+> local:whereis_name({sample_name_server, hoge}).
+<0.42.0>
+
+%% Registered name can be used as gen_server's via name
+> gen_server:cast({via, local, {sample_name_server, hoge}}, hello).
+ok
+
+> flush().
+Shell got {'$gen_cast',hello}
+ok
+
+
+%% Unregisters process name
+> local:unregister_name({sample_name_server, hoge}).
+ok
+
+> local:whereis_name({sample_name_server, hoge}).
+undefined
+
+
+%% Stops name server
+> ok = local:stop_name_server(sample_name_server).
+> local:which_name_servers().
+[]
+```
+
+Embedded Mode
+-------------
+
+Local can be embedded in your application.
+
+```erlang
+%% Embedding Example
+-module(your_app_sup).
+
+-behaviour(supervisor).
+
+-export([init/1]). % 'supervisor' callback API
+
+init([]) ->
+    Child1 = local:name_server_child_spec(your_app_name_server_1),
+    Child2 = local:name_server_child_spec(your_app_name_server_2),
+    {ok, { {one_for_one, 5, 10}, [Child1, Child2]} }.
+```
+
+API
+---
+See (EDoc Document)[doc/local.md]
diff --git a/doc/README.md b/doc/README.md
deleted file mode 100644
index 662992e..0000000
--- a/doc/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-# The local application #
-
-
-## Modules ##
-
-
-<table width="100%" border="0" summary="list of modules">
-<tr><td><a href="local.md" class="module">local</a></td></tr>
-<tr><td><a href="local_name_server.md" class="module">local_name_server</a></td></tr></table>
-
diff --git a/doc/local.md b/doc/local.md
index 9c60764..ba8f4fa 100644
--- a/doc/local.md
+++ b/doc/local.md
@@ -1,11 +1,14 @@
 
 
 # Module local #
+* [Description](#description)
 * [Data Types](#types)
 * [Function Index](#index)
 * [Function Details](#functions)
 
-Copyright (c) 2013-2014, Takeru Ohta <phjgt308@gmail.com>
+
+A Local Name Registration Facility.
+Copyright (c) 2014, Takeru Ohta <phjgt308@gmail.com>
 
 
 <a name="types"></a>
@@ -53,26 +56,42 @@
 ## Function Index ##
 
 
-<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#make_name_server_child_spec-1">make_name_server_child_spec/1</a></td><td></td></tr><tr><td valign="top"><a href="#register_name-2">register_name/2</a></td><td></td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td></td></tr><tr><td valign="top"><a href="#start_name_server-1">start_name_server/1</a></td><td></td></tr><tr><td valign="top"><a href="#stop_name_server-1">stop_name_server/1</a></td><td></td></tr><tr><td valign="top"><a href="#unregister_name-1">unregister_name/1</a></td><td></td></tr><tr><td valign="top"><a href="#whereis_name-1">whereis_name/1</a></td><td></td></tr><tr><td valign="top"><a href="#which_name_servers-0">which_name_servers/0</a></td><td></td></tr></table>
+<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#name_server_child_spec-1">name_server_child_spec/1</a></td><td>Equivalent to <a href="#name_server_child_spec-3"><tt>name_server_child_spec(Name, Name, 5000)</tt></a>.</td></tr><tr><td valign="top"><a href="#name_server_child_spec-3">name_server_child_spec/3</a></td><td>Returns the child spec for a local name server that is used in embedded mode.</td></tr><tr><td valign="top"><a href="#register_name-2">register_name/2</a></td><td>Locally assocates the name <code>Name</code> with a pid <code>Pid</code>.</td></tr><tr><td valign="top"><a href="#send-2">send/2</a></td><td>Sends the message <code>Msg</code> to the pid locally registered as <code>Name</code></td></tr><tr><td valign="top"><a href="#start_name_server-1">start_name_server/1</a></td><td>Starts a name server process.</td></tr><tr><td valign="top"><a href="#stop_name_server-1">stop_name_server/1</a></td><td>Stops the name server <code>ServerName</code></td></tr><tr><td valign="top"><a href="#unregister_name-1">unregister_name/1</a></td><td>Removes the locally registered name <code>Name</code></td></tr><tr><td valign="top"><a href="#whereis_name-1">whereis_name/1</a></td><td>Returns the pid with the locally registered name <code>Name</code></td></tr><tr><td valign="top"><a href="#which_name_servers-0">which_name_servers/0</a></td><td>Returns a list of running name server.</td></tr></table>
 
 
 <a name="functions"></a>
 
 ## Function Details ##
 
-<a name="make_name_server_child_spec-1"></a>
+<a name="name_server_child_spec-1"></a>
 
-### make_name_server_child_spec/1 ###
+### name_server_child_spec/1 ###
 
 
 <pre><code>
-make_name_server_child_spec(Name::<a href="#type-name_server_name">name_server_name()</a>) -&gt; <a href="supervisor.md#type-child_spec">supervisor:child_spec()</a>
+name_server_child_spec(Name::<a href="#type-name_server_name">name_server_name()</a>) -&gt; <a href="supervisor.md#type-child_spec">supervisor:child_spec()</a>
 </code></pre>
 
 <br></br>
 
 
+Equivalent to [`name_server_child_spec(Name, Name, 5000)`](#name_server_child_spec-3).
+<a name="name_server_child_spec-3"></a>
 
+### name_server_child_spec/3 ###
+
+
+<pre><code>
+name_server_child_spec(ChildId, ServerName, Shutdown) -&gt; ChildSpec
+</code></pre>
+
+<ul class="definitions"><li><code>ChildId = <a href="supervisor.md#type-child_id">supervisor:child_id()</a></code></li><li><code>ServerName = <a href="#type-name_server_name">name_server_name()</a></code></li><li><code>Shutdown = <a href="supervisor.md#type-shutdown">supervisor:shutdown()</a></code></li><li><code>ChildSpec = <a href="supervisor.md#type-child_spec">supervisor:child_spec()</a></code></li></ul>
+
+
+Returns the child spec for a local name server that is used in embedded mode.
+
+
+To embed a local name server in your application, you can add the child spec `ChildSpec` to your supervision tree.
 <a name="register_name-2"></a>
 
 ### register_name/2 ###
@@ -86,6 +105,20 @@
 
 
 
+Locally assocates the name `Name` with a pid `Pid`.
+
+
+
+Let `NameServer` is `element(1, Name)`, the registered name is limited to the name server `NameServer` scope.
+
+
+
+Assumes that the name server is already started, crashes otherwise.
+
+
+The function returns `yes` if successful, `no` if it failes.
+For example, `no` is returned if an attempt is made to register an already registered process or
+to register a process with a name that is already in use.
 <a name="send-2"></a>
 
 ### send/2 ###
@@ -99,30 +132,51 @@
 
 
 
+Sends the message `Msg` to the pid locally registered as `Name`
+
+
+Failure: If `Name` is not a locally registered name, the calling function will exit with reason `{badarg, {Name, Msg}}`
 <a name="start_name_server-1"></a>
 
 ### start_name_server/1 ###
 
 
 <pre><code>
-start_name_server(Name::<a href="#type-name_server_name">name_server_name()</a>) -&gt; ok | {error, Reason}
+start_name_server(ServerName::<a href="#type-name_server_name">name_server_name()</a>) -&gt; ok | {error, Reason}
 </code></pre>
 
-<ul class="definitions"><li><code>Reason = already_present | {already_started, pid()}</code></li></ul>
+<ul class="definitions"><li><code>Reason = already_present</code></li></ul>
 
 
+Starts a name server process
+
+
+
+The process is registered locally as `ServerName` using `register/2`.
+
+
+
+If the process is successfully started the function returns `ok`.
+
+
+If there already exists a process with the specified `ServerName` the function returnes `{error, already_present}`.
 <a name="stop_name_server-1"></a>
 
 ### stop_name_server/1 ###
 
 
 <pre><code>
-stop_name_server(Name::<a href="#type-name_server_name">name_server_name()</a>) -&gt; ok | {error, Reason}
+stop_name_server(ServerName::<a href="#type-name_server_name">name_server_name()</a>) -&gt; ok | {error, Reason}
 </code></pre>
 
 <ul class="definitions"><li><code>Reason = not_found</code></li></ul>
 
 
+Stops the name server `ServerName`
+
+
+If successful, the function returns `ok`.
+If the name server identified by `ServerName` does not exist, the function returns `{error, not_found}`.
 <a name="unregister_name-1"></a>
 
 ### unregister_name/1 ###
@@ -135,7 +189,7 @@
 <br></br>
 
 
-
+Removes the locally registered name `Name`
 <a name="whereis_name-1"></a>
 
 ### whereis_name/1 ###
@@ -149,6 +203,10 @@
 
 
 
+Returns the pid with the locally registered name `Name`
+
+
+Returns `undefined` if the name is not locally registered.
 <a name="which_name_servers-0"></a>
 
 ### which_name_servers/0 ###
@@ -161,4 +219,4 @@
 <br></br>
 
 
-
+Returns a list of running name server
diff --git a/rebar.config b/rebar.config
index 6151883..8c5a97e 100644
--- a/rebar.config
+++ b/rebar.config
@@ -14,7 +14,7 @@
 {cover_enabled, true}.
 
 {edoc_opts, [
-%%             {doclet, edown_doclet},
+             %% {doclet, edown_doclet},
              {dialyzer_specs, all},
              {report_missing_type, true},
              {report_type_mismatch, true},
@@ -26,7 +26,5 @@
 
 {deps,
   [
-   %% {meck, ".*", {git, "git://github.com/eproxus/meck.git", {tag, "0.8.2"}}},
-   %% {reloader, ".*", {git, "git://github.com/sile/reloader.git", {tag, "0.1.0"}}},
    %% {edown, ".*", {git, "git://github.com/sile/edown.git", {tag, "0.3.2"}}}
   ]}.
diff --git a/src/local.erl b/src/local.erl
index 1f4595f..5eb128e 100644
--- a/src/local.erl
+++ b/src/local.erl
@@ -1,6 +1,6 @@
-%% @copyright 2013-2014, Takeru Ohta <phjgt308@gmail.com>
+%% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
-%% TODO: doc
+%% @doc A Local Name Registration Facility
 -module(local).
 
 %%----------------------------------------------------------------------------------------------------------------------
@@ -15,54 +15,81 @@
 -export([whereis_name/1]).
 -export([send/2]).
 
--export([make_name_server_child_spec/1]).
+-export([name_server_child_spec/1, name_server_child_spec/3]).
 
--export_type([name_server_name/0]).
 -export_type([name/0]).
+-export_type([name_server_name/0]).
 -export_type([process_name/0]).
 
 %%----------------------------------------------------------------------------------------------------------------------
 %% Macros & Types
 %%----------------------------------------------------------------------------------------------------------------------
--type name_server_name() :: atom().
 -type name() :: {name_server_name(), process_name()}.
+-type name_server_name() :: atom().
 -type process_name() :: term().
 
 %%----------------------------------------------------------------------------------------------------------------------
 %% Exported Functions
 %%----------------------------------------------------------------------------------------------------------------------
+%% @doc Starts a name server process
+%%
+%% The process is registered locally as `ServerName' using `register/2'.
+%%
+%% If the process is successfully started the function returns `ok'.
+%%
+%% If there already exists a process with the specified `ServerName' the function returnes `{error, already_present}'.
 -spec start_name_server(name_server_name()) -> ok | {error, Reason} when
-      Reason :: already_present | {already_started, pid()}.
-start_name_server(Name) when is_atom(Name) ->
-    local_sup:start_name_server(Name);
-start_name_server(Name) -> error(badarg, [Name]).
+      Reason :: already_present.
+start_name_server(ServerName) when is_atom(ServerName) ->
+    local_sup:start_name_server(ServerName);
+start_name_server(ServerName) -> error(badarg, [ServerName]).
 
+%% @doc Stops the name server `ServerName'
+%%
+%% If successful, the function returns `ok'.
+%% If the name server identified by `ServerName' does not exist, the function returns `{error, not_found}'.
 -spec stop_name_server(name_server_name()) -> ok | {error, Reason} when
       Reason :: not_found.
-stop_name_server(Name) when is_atom(Name) ->
-    local_sup:stop_name_server(Name);
-stop_name_server(Name) -> error(badarg, [Name]).
+stop_name_server(ServerName) when is_atom(ServerName) ->
+    local_sup:stop_name_server(ServerName);
+stop_name_server(ServerName) -> error(badarg, [ServerName]).
 
-
+%% @doc Returns a list of running name server
 -spec which_name_servers() -> [name_server_name()].
 which_name_servers() ->
     local_sup:which_name_servers().
 
--spec register_name(name(), pid()) -> yes | no.
-register_name({Server, Name}, Pid) when is_atom(Server), is_pid(Pid) ->
-    local_name_server:register_name(Server, Name, Pid);
+%% @doc Locally assocates the name `Name' with a pid `Pid'.
+%%
+%% Let `NameServer' is `element(1, Name)', the registered name is limited to the name server `NameServer' scope.
+%%
+%% Assumes that the name server is already started, crashes otherwise.
+%%
+%% The function returns `yes' if successful, `no' if it failes.
+%% For example, `no' is returned if an attempt is made to register an already registered process or
+%% to register a process with a name that is already in use.
+-spec register_name(Name :: name(), Pid :: pid()) -> yes | no.
+register_name({NameServer, ProcName}, Pid) when is_atom(NameServer), is_pid(Pid) ->
+    local_name_server:register_name(NameServer, ProcName, Pid);
 register_name(Name, Pid) -> error(badarg, [Name, Pid]).
 
--spec unregister_name(name()) -> ok.
-unregister_name({Server, Name}) when is_atom(Server) ->
-    local_name_server:unregister_name(Server, Name);
+%% @doc Removes the locally registered name `Name'
+-spec unregister_name(Name :: name()) -> ok.
+unregister_name({NameServer, ProcName}) when is_atom(NameServer) ->
+    local_name_server:unregister_name(NameServer, ProcName);
 unregister_name(Name) -> error(badarg, [Name]).
 
+%% @doc Returns the pid with the locally registered name `Name'
+%%
+%% Returns `undefined' if the name is not locally registered.
 -spec whereis_name(name()) -> pid() | undefined.
-whereis_name({Server, Name}) when is_atom(Server) ->
-    local_name_server:whereis_name(Server, Name);
+whereis_name({NameServer, ProcName}) when is_atom(NameServer) ->
+    local_name_server:whereis_name(NameServer, ProcName);
 whereis_name(Name) -> error(badarg, [Name]).
 
+%% @doc Sends the message `Msg' to the pid locally registered as `Name'
+%%
+%% Failure: If `Name' is not a locally registered name, the calling function will exit with reason `{badarg, {Name, Msg}}'
 -spec send(name(), term()) -> pid().
 send(Name, Msg) ->
     case whereis_name(Name) of
@@ -70,7 +97,20 @@
         Pid       -> _ = Pid ! Msg, Pid
     end.
 
--spec make_name_server_child_spec(name_server_name()) -> supervisor:child_spec().
-make_name_server_child_spec(Name) when is_atom(Name) ->
-    {Name, {local_name_server, start_link, [Name]}, permanent, 5000, worker, [local_name_server]};
-make_name_server_child_spec(Name) -> error(badarg, [Name]).
+%% @equiv name_server_child_spec(Name, Name, 5000)
+-spec name_server_child_spec(name_server_name()) -> supervisor:child_spec().
+name_server_child_spec(Name) ->
+    name_server_child_spec(Name, Name, 5000).
+
+%% @doc Returns the child spec for a local name server that is used in embedded mode.
+%%
+%% To embed a local name server in your application, you can simply add `ChildSpec' to your supervision tree.
+-spec name_server_child_spec(ChildId, ServerName, Shutdown) -> ChildSpec when
+      ChildId    :: supervisor:child_id(),
+      ServerName :: name_server_name(),
+      Shutdown   :: supervisor:shutdown(),
+      ChildSpec  :: supervisor:child_spec().
+name_server_child_spec(ChildId, ServerName, Shutdown) when is_atom(ServerName) ->
+    {ChildId, {local_name_server, start_link, [ServerName]}, permanent, Shutdown, worker, [local_name_server]};
+name_server_child_spec(ChildId, ServerName, Shutdown) ->
+    error(badarg, [ChildId, ServerName, Shutdown]).
diff --git a/src/local_app.erl b/src/local_app.erl
index 49cc6eb..f86e045 100644
--- a/src/local_app.erl
+++ b/src/local_app.erl
@@ -1,5 +1,6 @@
-%% @copyright 2013-2014, Takeru Ohta <phjgt308@gmail.com>
+%% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
+%% @doc application module
 %% @private
 -module(local_app).
 
diff --git a/src/local_lib.erl b/src/local_lib.erl
index ecaf5f3..3d48b13 100644
--- a/src/local_lib.erl
+++ b/src/local_lib.erl
@@ -1,5 +1,6 @@
-%% @copyright 2013-2014, Takeru Ohta <phjgt308@gmail.com>
+%% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
+%% @doc Utility Functions
 %% @private
 -module(local_lib).
 
diff --git a/src/local_name_server.erl b/src/local_name_server.erl
index e6d1677..a9b5391 100644
--- a/src/local_name_server.erl
+++ b/src/local_name_server.erl
@@ -1,6 +1,7 @@
 %% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
-%% TODO: doc
+%% @doc Local Name Server
+%% @private
 -module(local_name_server).
 
 -behaviour(gen_server).
@@ -9,10 +10,6 @@
 %% Exported API
 %%----------------------------------------------------------------------------------------------------------------------
 -export([start_link/1]).
-
-%%----------------------------------------------------------------------------------------------------------------------
-%% Application Internal API
-%%----------------------------------------------------------------------------------------------------------------------
 -export([register_name/3]).
 -export([unregister_name/2]).
 -export([whereis_name/2]).
@@ -34,25 +31,23 @@
 %%----------------------------------------------------------------------------------------------------------------------
 %% Exported Functions
 %%----------------------------------------------------------------------------------------------------------------------
+%% @doc Starts a new local name server process
 -spec start_link(local:name_server_name()) -> {ok, pid()} | {error, Reason} when
       Reason :: {already_started, pid()}.
 start_link(Name) ->
     gen_server:start_link({local, Name}, ?MODULE, [Name], []).
 
-%%----------------------------------------------------------------------------------------------------------------------
-%% Application Internal Functions
-%%----------------------------------------------------------------------------------------------------------------------
-%% @private
+%% @see local:register_name/2
 -spec register_name(local:name_server_name(), local:process_name(), pid()) -> yes | no.
 register_name(Server, Name, Pid) ->
     gen_server:call(Server, {register_name, {Name, Pid}}).
 
-%% @private
+%% @see local:unregister_name/2
 -spec unregister_name(local:name_server_name(), local:process_name()) -> ok.
 unregister_name(Server, Name) ->
     gen_server:call(Server, {unregister_name, Name}).
 
-%% @private
+%% @see local:whereis_name/2
 -spec whereis_name(local:name_server_name(), local:process_name()) -> pid() | undefined.
 whereis_name(Server, Name) ->
     try ets:lookup(Server, Name) of
diff --git a/src/local_sup.erl b/src/local_sup.erl
index 2ead487..af05fb6 100644
--- a/src/local_sup.erl
+++ b/src/local_sup.erl
@@ -1,5 +1,6 @@
-%% @copyright 2013-2014, Takeru Ohta <phjgt308@gmail.com>
+%% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
+%% @doc application root supervisor
 %% @private
 -module(local_sup).
 
@@ -27,17 +28,18 @@
 start_link() ->
     supervisor:start_link({local, ?MODULE}, ?MODULE, []).
 
+%% @doc Starts new local name server
 -spec start_name_server(local:name_server_name()) -> ok | {error, Reason} when
-      Reason :: already_present | {already_started, pid()}.
+      Reason :: already_present.
 start_name_server(Name) ->
-    Child = local:make_name_server_child_spec(Name),
-    case supervisor:start_child(?MODULE, Child) of
-        {ok, _Pid}                      -> ok;
-        {error, already_present}        -> {error, already_present};
-        {error, {already_started, Pid}} -> {error, {already_started, Pid}};
-        Other                           -> error({unexpected_result, Other}, [Name])
+    case supervisor:start_child(?MODULE, local:name_server_child_spec(Name)) of
+        {ok, _Pid}                    -> ok;
+        {error, already_present}      -> {error, already_present};
+        {error, {already_started, _}} -> {error, already_present};
+        Other                         -> error({unexpected_result, Other}, [Name])
     end.
 
+%% @doc Stops the name server identified by `Name'
 -spec stop_name_server(local:name_server_name()) -> ok | {error, Reason} when
       Reason :: not_found.
 stop_name_server(Name) ->
@@ -46,6 +48,7 @@
         ok                 -> ok = supervisor:delete_child(?MODULE, Name)
     end.
 
+%% @doc Returns a list of running name server
 -spec which_name_servers() -> [local:name_server_name()].
 which_name_servers() ->
     [Id || {Id, _, _, _} <- supervisor:which_children(?MODULE)].
diff --git a/test/echo_gen_server.erl b/test/echo_gen_server.erl
index e2e5a16..2dc2962 100644
--- a/test/echo_gen_server.erl
+++ b/test/echo_gen_server.erl
@@ -1,6 +1,6 @@
 %% @copyright 2014, Takeru Ohta <phjgt308@gmail.com>
 %%
-%% @doc TODO
+%% @doc Echo Server for Unit Test
 -module(echo_gen_server).
 
 %%----------------------------------------------------------------------------------------------------------------------
@@ -17,10 +17,12 @@
 %%----------------------------------------------------------------------------------------------------------------------
 %% Exported Functions
 %%----------------------------------------------------------------------------------------------------------------------
+%% @doc Starts echo server
 -spec start_link(term()) -> {ok, pid()} | {error, Reason::term()}.
 start_link(Name) ->
     gen_server:start_link(Name, ?MODULE, [], []).
 
+%% @doc Returns `{echo, Msg}'
 -spec call(term(), term()) -> {echo, term()}.
 call(Name, Msg) ->
     gen_server:call(Name, {call, Msg}).
diff --git a/test/local_lib_tests.erl b/test/local_lib_tests.erl
index 4fb5f0f..bd308f1 100644
--- a/test/local_lib_tests.erl
+++ b/test/local_lib_tests.erl
@@ -9,7 +9,7 @@
 %%----------------------------------------------------------------------------------------------------------------------
 link_and_flush_test_() ->
     [
-     {"normal unlink",
+     {"unlink_and_flush: no flush",
       fun () ->
               Pid = spawn_link(timer, sleep, [infinity]),
               true = link(Pid),
@@ -17,7 +17,7 @@
               exit(Pid, kill),
               ?assert(true)
       end},
-     {"flush unlink",
+     {"unlink_and_flush: flush EXIT message",
       fun () ->
               process_flag(trap_exit, true),
 
@@ -31,7 +31,7 @@
               after 10 -> ?assert(true)
               end
       end},
-     {"flush unlink",
+     {"unlink: receive EXIT message",
       fun () ->
               process_flag(trap_exit, true),
 
diff --git a/test/local_tests.erl b/test/local_tests.erl
index 292177b..042890b 100644
--- a/test/local_tests.erl
+++ b/test/local_tests.erl
@@ -27,7 +27,7 @@
      {"duplicated start",
       fun () ->
               ?assertEqual(ok, local:start_name_server(?NS)),
-              ?assertMatch({error, {already_started, _}}, local:start_name_server(?NS)),
+              ?assertMatch({error, already_present}, local:start_name_server(?NS)),
               ?assertEqual(ok, local:stop_name_server(?NS))
       end},
      {"delete not-started server",