- refactor, check for existing copy

git-svn-id: https://gnunet.org/svn/gnunet@32938 140774ce-b5e7-0310-ab8b-a85725594a96
-process in logical order

git-svn-id: https://gnunet.org/svn/gnunet@32939 140774ce-b5e7-0310-ab8b-a85725594a96