cleanup
additional parameter input_collection_is_source (if true we won't append a random number to the collection)