Cleaned up curl.c a bit