Added curl and cleanup