cleanup of urls and subsequent removal of unnecessary files