Start of api stuff. Need libcurl for it
Init and cleanup