rename cleanup function
add http[s]://|ftp:// support