Cleanup modification

In this patch cleanup depends not on project defined appId (which now is being used only for initial uploads) but on actually uploaded public_identifier.