 
 
   def find_or_create_owner(owner_map) do
-    case Repo.get_by(User, email: owner_map[:email]) do
-      nil -> %User{}
+    case Repo.get_by(Pan.User, email: owner_map[:email]) do
+      nil -> %Pan.User{}
              |> Map.merge(owner_map)
              |> Map.merge(%{username: owner_map[:name]})
              |> Repo.insert()



  def find_or_create_podcast(podcast_map, owner_id) do
    case Repo.get_by(Podcast, title: podcast_map[:title]) do
      nil -> %Podcast{owner_id: owner_id}
             |> Map.merge(podcast_map)
             |> Repo.insert()
      podcast -> {:ok, podcast}

  end


  def find_or_create_contributor(contributor_map) do
    case Repo.get_by(Pan.Contributor, uri: contributor_map[:uri]) do
      nil -> %Pan.Contributor()
             |> Map.merge(contributor_map)
             |> Repo.insert()
      contributor -> {:ok, contributor}
