Refactor the code that makes the http calls
Implemented get_version