Move headers to global variable
Move api url into a function for easy upgrading of API version