Updated scanner.c to try and reduce redundant code as well as handle memory allocation and free'ing better. Updated cURL functions to work approrpriately. Took out str_replace(%20) in ask_for_barcode() as it's still causing issues.