       nil ->
         {:ok, session_id} = Hound.Session.create_session(driver_info[:browser])
 
-        all_sessions = HashDict.new
-          |> HashDict.put :default, session_id
-
-        session_info = HashDict.new
-          |> HashDict.put(:current, session_id)
-          |> HashDict.put(:all_sessions, all_sessions)
-
-        state_upgrade = HashDict.new |> HashDict.put(pid, session_info)
-        new_state = HashDict.merge(state, state_upgrade)
+        all_sessions = %{default: session_id}
+        session_info = %{current: session_id, all_sessions: all_sessions}
+        state_upgrade = %{} |> Map.put(pid, session_info)
+        new_state = Map.merge(state, state_upgrade)
         {:reply, session_id, new_state}
       session_id ->
         {:reply, session_id, state}



  def handle_call({:destroy_sessions, pid}, _from, state) do
    if HashDict.has_key?(state, pid) do
      sessions = state[pid][:all_sessions]
      Enum.each sessions, fn({_session_name, session_id})->
        Hound.Session.destroy_session(session_id)
      end
      state = HashDict.delete(state, pid)
    end
    {:reply, :ok, state}
  end

  use GenServer

  def start_link do
    state = %{}
    :gen_server.start_link({:local, __MODULE__}, __MODULE__, state, [])
  end

