 
 
   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_alternate_feeds(alternate_feeds_map, feed_id) do
    for {uuid, alternate_feed_map} <- alternate_feeds_map do
      case Repo.get_by(AlternateFeed, url: alternate_feed_map[:url])
        nil -> %AlternateFeed(feed_id: feed_id)
               |> Map.merge(alternate_feed_map)
               |> Repo.insert()
        alternate_feed -> {:ok, alternate_feed}



  def find_or_create_feed(feed_map, podcast_id) do
    case Repo.get_by(Pan.Feed, self_link_url: feed_map[:self_link_url]) do
      nil -> %Pan.Feed{podcast_id: podcast_id}
             |> Map.merge(feed_map)
             |> Repo.insert()
      feed -> {:ok, feed}
