remove unused function; cleanup curl;