Add require for ext-curl.
Fix bug with the GEO type and remove duplicate code.