anchor.diff:      ManifestResponseCode = response_http_status(ManifestResponse),
       if
           ManifestResponseCode =/= 200 -> lager:error("Could not retrieve the manifest of the image you are looking for: ~p", [ManifestResponseCode]);
  -        true ->  retrieve_image(jsx:decode(
  -                                  list_to_binary(
  -                                             response_body(ManifestResponse)), [return_maps]))
  +        true ->  retrieve_image(Name, Tag, list_to_binary(response_body(ManifestResponse)), DockerAuth)
       end.
   
   pull(Name) ->
  
positive.code: %%====================================================================
  %% Internal functions
  %%====================================================================
  retrieve_image(ManifestResponseMap) ->
      lager:info("Manifest for the image: ~p", [ManifestResponseMap]),
      %%filelib:ensure_dir(image_dir_name(Id)),
      %%Layers = get_ancestry(Id, DockerAuth),
      %%lager:info("Received ancestry : ~p", [Layers]),
      true.
      
  layer_filename(Id) ->
      ?BEAMWHALE_DIR ++ "/layers/" ++ Id ++ ".tar".
  
  image_dir_name(Id) ->
      ?BEAMWHALE_DIR ++ "/images/" ++ Id.
  
  save_layer(Id, Name) ->
      Endpoint = "/images/" ++ Id ++ "layer",
      DockerAuth = h_get_docker_auth(Name),
      h_get(Endpoint, DockerAuth, [{stream, layer_filename(Id)}]).
  
  untar_layer(Id, Rootdir) ->
      erl_tar:extract(layer_filename(Id), {cwd, Rootdir}).
  
  get_image_manifest(Name, DockerAuth, Tag) ->
      h_get(Name ++"/manifests/" ++ Tag, DockerAuth, []).
  
negative.code:     lager:info("HTTP GET: ~p", [?DOCKER_REGISTRY ++ Endpoint]),
      httpc:request(get,
                    {?DOCKER_REGISTRY ++ Endpoint, 
                     [{"Authorization", "Bearer " ++ binary_to_list(DockerAuth#docker_auth.token)}, 
                      {"Accept", ?DOCKER_REGISTRY_MANIFEST_SCHEME}]}, [], Options).
  
  h_get_docker_auth(Name)->    
      Url = ?DOCKER_AUTH_API ++":" ++ Name ++":pull",
  